Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "1.0.2"
Version is the current version of the package.
Functions ¶
func Invoke ¶
Invoke gets a service safely typed by passing it to a closure will panic if callback is not a function
func MustInvoke ¶
MustInvoke calls MustGet underneath will panic if service not found within container
Types ¶
type Container ¶
type Container interface {
Register(id string, service any)
Get(id string) (any, bool)
MustGet(id string) any
Invoke(id string, fn any)
MustInvoke(id string, fn any)
Has(id string) bool
//
Length() int
//
ForEach(fn func(id string, service any) error) (err error)
}
Container is DI Container
Click to show internal directories.
Click to hide internal directories.