func (inj *injector) Invoke(f interface{}) ([]reflect.Value, error) {
	t := reflect.TypeOf(f)
	switch v := f.(type) {
	case FastInvoker:
		return inj.fastInvoke(v, t, t.NumIn())
	default:
		return inj.callInvoke(f, t, t.NumIn())
	}
}
Invoke attempts to call the interface{} provided as a function,
providing dependencies for function arguments based on Type.
Returns a slice of reflect.Value representing the returned values of the function.
Returns an error if the injection fails.
It panics if f is not a function
package inject
import (
	"fmt"
	"reflect"
)
type Injector interface {
	Applicator
	Invoker
	TypeMapper
	SetParent(Injector)
}
type Applicator interface {
	Apply(interface{}) error
}
type Invoker interface {
	Invoke(interface{}) ([]reflect.Value, error)
}
type FastInvoker interface {
	Invoke([]interface{}) ([]reflect.Value, error)
}
func IsFastInvoker(handler interface{}) bool {
	_, ok := handler.(FastInvoker)
	return ok
}
type TypeMapper interface {
	Map(...interface{}) TypeMapper
	MapTo(interface{}, interface{}) TypeMapper
	Set(reflect.Type, reflect.Value) TypeMapper
	Value(reflect.Type) reflect.Value
}
type injector struct {
	values map[reflect.Type]reflect.Value
	parent Injector
}
func InterfaceOf(value interface{}) reflect.Type {
	t := reflect.TypeOf(value)
	for t.Kind() == reflect.Ptr {
		t = t.Elem()
	}
	if t.Kind() != reflect.Interface {
		panic("called inject.InterfaceOf with a value that is not a pointer to an interface. (*MyInterface)(nil)")
	}
	return t
}
func New() Injector {
	return &injector{
		values: make(map[reflect.Type]reflect.Value),
	}
}