github.com/defval/inject (go): Package inject make your dependency injection easy. Container allows you to inject dependencies into constructors or structures without the need to have specified each argument manually.  First of all, when creating a new container, you need to describe how to create each instance of a dependency. To do this, use the container option inject.Provide().  Now, container knows how to create *pkg.Dependency and *pkg.AnotherDependency. For advanced providing see inject.Provide() and inject.ProvideOption documentation.  After building a container, it is easy to get any previously provided type. To do this, use the container's Extract() method.  The container collects a dependencies of *pkg.AnotherDependency, creates its instance and places it in a target pointer. For advanced extraction see Extract() and inject.ExtractOption documentation.
Keywords: dependency-injection|di|go|golang|injector|ioc|ioc-container