func (c *Container) GetByType(typ interface{}) interface{} {
	t := reflect.TypeOf(typ)
	for _, d := range c.dependencies {
		dt := reflect.TypeOf(d)
		if t.AssignableTo(dt) {
			return d
		}
	}
	return nil
}
// GetByType returns a dependency by type.
GetByType returns a dependency by type.
// GetByType returns a dependency by type .
func (c *Container) GetByType(typ interface{}) interface{} {
	t := reflect.TypeOf(typ)
	for _, d := range c.dependencies {
		dt := reflect.TypeOf(d)
		if t.AssignableTo(dt) {
			return d
		}
	}
	return nil
}
func ( c * Container ) GetByType ( typ interface { } ) interface { } { t := reflect . TypeOf ( typ ) for _ , d := range c . dependencies { dt := reflect . TypeOf ( d ) if t . AssignableTo ( dt ) { return d } } return nil }
GetByType returns a dependency by type.
GetByType returns a dependency by type .