Documentation ¶
Overview ¶
Package di provides a reflection-based dependency injection toolkit.
Index ¶
- func Catch(format string, err *error)
- type Builder
- func (a *Builder) AddScoped(constructor any, itype any) *Builder
- func (a *Builder) AddShared(constructor any, itype any) *Builder
- func (a *Builder) AddValue(value any, itype any) *Builder
- func (a *Builder) Build() (injector *Injector, err error)
- func (a *Builder) SetCreator(creator Creator) *Builder
- type Clean
- type Closer
- type Creator
- type Injector
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder represents a injector builder.
func (*Builder) SetCreator ¶
SetCreator sets the creator.
type Closer ¶
type Closer interface {
Close() error
}
Closer is the interface that wraps the basic Close method.
Click to show internal directories.
Click to hide internal directories.