Dependency injection for Go programming language.
Tutorial | Examples | Advanced features
Dependency injection is one form of the broader technique of inversion of control. It is used to increase modularity of the program and make it extensible.
This library helps you to organize responsibilities in your codebase and make it easy to combine low-level implementation into high-level behavior without boilerplate.
- Intuitive auto wiring
- Interface implementations
- Constructor injection
- Optional injection
- Field injection
- Lazy-loading
- Named types
- Grouping
- Cleanup
You can use standard pkg.go.dev and inline code comments. If you do not have experience with auto-wiring libraries as google/wire, uber-go/dig or another - start with tutorial.
go get github.com/goava/di
If you have any questions, feel free to create an issue.