Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // NewContainer returns a new, valid container. NewContainer = depinject.NewContainer // DefaultContainer returns a new container with the default options. DefaultContainer = depinject.DefaultContainer )
Available functions from this package.
Functions ¶
func Invoke ¶
Invoke invokes the given functions with the dependencies injected from the global container instance.
Types ¶
type Container ¶
Container is the main entrypoint of this depinject library. Its usage should be as follows:
container := NewContainer() container.Provide(constructor1, constructor2, ...) container.Invoke(func(dep1, dep2, ...) { // do something with the dependencies })
Click to show internal directories.
Click to hide internal directories.