Simpler compile-time dependency injection and a runtime singleton container for go. Inspired by Wire and Symfony Service Container
Installation: go get github.com/mgnsk/di-container/cmd/initgen
$ cd example
$ go generate
- Run the example app using the initializers:
$ go run cmd/main.go
It is also possible to use the container dynamically on runtime. In that case it acts like a singleton container.