Lightweight GO Dependency Injection Framework - did it just for learning (POC)
type SomeInterface interface {
Foo()
}
type SomeConcrete struct {
}
func (SomeConcrete foo) Foo() {
}
func main() {
cb := litedi.CreateContainerBuilder()
var i SomeInterface
var c = cb.Register(&i, SomeConcrete{},litedi.Singleton).Build()
c.Resolve(&i)
i.Foo()
}