Documentation
¶
Overview ¶
Package dig provides a default, package-level container and functions that interact with it.
It's meant to be a quick and easy way to use the di package, sufficient for most cases where only 1 container is needed.
Why `dig`? It stands for "DI Global". Also, it's short and easy to type.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustGet ¶
func MustGet[T any](opts ...di.OptionsFunc) T
func MustGetByTag ¶ added in v0.3.0
Types ¶
type Builder ¶ added in v0.3.0
type Builder struct {
// contains filtered or unexported fields
}
func CompilerPass ¶ added in v0.4.0
func CompilerPass(stage di.CompilerPassStage, priority int, pass di.CompilerPass) *Builder
func Services ¶ added in v0.4.0
func Services(services ...*di.DefinitionBuilder) *Builder
func (*Builder) CompilerPass ¶ added in v0.4.0
func (b *Builder) CompilerPass(stage di.CompilerPassStage, priority int, pass di.CompilerPass) *Builder
Click to show internal directories.
Click to hide internal directories.