Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 523 Bytes

README.md

File metadata and controls

27 lines (20 loc) · 523 Bytes

LiteDI

Lightweight GO Dependency Injection Framework - did it just for learning (POC)

Build status

Example

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()
}