Documentation
¶
Overview ¶
Package di a simple dependencies injection
Index ¶
- func MustResolve[T any]() T
- func MustResolveNamed[T any](name string) T
- func Provide[T any](value T, override bool) bool
- func ProvideLazy[T any](initFunc func() (T, error), override bool) bool
- func ProvideNamed(name string, value any, override bool) (ok bool)
- func Resolve[T any]() (T, error)
- func ResolveNamed[T any](name string) (value T, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustResolveNamed ¶
MustResolveNamed get the value for the name, if not exist create panic
func ProvideLazy ¶
ProvideLazy save the lazy init value and return is it saved
func ProvideNamed ¶
ProvideNamed save the value for the name and return is it saved
func ResolveNamed ¶
ResolveNamed get the value for the name if not exist returns error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.