func (c *Type) SetShared(key string, f ServiceFunc) {
	c.mu.Lock()
	defer c.mu.Unlock()

	c.definitions[key] = &ServiceDefinition{
		Func: f,
		Type: ServiceTypeShared,
	}

	// Delete existing resolved object if any
	delete(c.resolved, key)
}
// SetShared will set the function for the given service. It will return a shared instance on each call to get
SetShared will set the function for the given service. It will return a shared instance on each call to get
// SetShared will set the function for the given service . It will return a shared instance on each call to get
func (c *Type) SetShared(key string, f ServiceFunc) {
	c.mu.Lock()
	defer c.mu.Unlock()
	c.definitions[key] = &ServiceDefinition{
		Func: f,
		Type: ServiceTypeShared,
	}
	delete(c.resolved, key)
}
func ( c * Type ) SetShared ( key string , f ServiceFunc ) { c . mu . Lock ( ) defer c . mu . Unlock ( ) c . definitions [ key ] = & ServiceDefinition { Func : f , Type : ServiceTypeShared , } delete ( c . resolved , key ) }
SetShared will set the function for the given service.
SetShared will set the function for the given service .
// Delete existing resolved object if any