depinject/depinject.go
func (di *dependencyInjector) cachedCreateFromType(atype reflect.Type) reflect.Value {
	_, exists := di.instances[atype]

	if !exists {
		di.instances[atype] = di.createFromType(atype)
	}

	return di.instances[atype]
}
func (di *dependencyInjector) cachedCreateFromType(atype reflect.Type) reflect.Value {
	_, exists := di.instances[atype]

	if !exists {
		di.instances[atype] = di.createFromType(atype)
	}

	return di.instances[atype]
}
func ( di * dependencyInjector ) cachedCreateFromType ( atype reflect . Type ) reflect . Value { _ , exists := di . instances [ atype ] if ! exists { di . instances [ atype ] = di . createFromType ( atype ) } return di . instances [ atype ] }
// cachedCreateFromType creates an instance of the given type
cachedCreateFromType creates an instance of the given type