Documentation ¶
Index ¶
- type Injector
- func (in *Injector) Call(fun reflect.Value) ([]reflect.Value, error)
- func (in *Injector) Child() *Injector
- func (in *Injector) Get(typ reflect.Type) reflect.Value
- func (in *Injector) Inject(val reflect.Value) error
- func (in *Injector) InjectStruct(val reflect.Value) error
- func (in *Injector) Lookup(typ reflect.Type) (reflect.Value, bool)
- func (in *Injector) Map(val reflect.Value) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Injector ¶
type Injector struct {
// contains filtered or unexported fields
}
Injector Save the current mapping and parent injectors.
func (*Injector) Get ¶
Get Find the value of the type from the mapping and return zero value if not.
func (*Injector) InjectStruct ¶
InjectStruct inject this value, structure will find the not `inject:"-"` tags for injection.
Click to show internal directories.
Click to hide internal directories.