module
Version:
v0.0.0-...-3e624d3
Opens a new window with list of versions in this module.
Published: Feb 17, 2023
License: MIT
Opens a new window with license information.
README
¶
DI container for Go
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
Example
$ 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.
Click to show internal directories.
Click to hide internal directories.