Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NameForType ¶
NameForType retrieves the name registered for a type. If no name was registered for the given type, the second value will be false
func NewByName ¶
NewByName creates a new value by the name it was registered under. If no type was registered at the given name, the second value will be false
func Register ¶
func Register(name string, i interface{}, reverse ...interface{})
Register a type in the global registry
func RegisterReverse ¶
func RegisterReverse(i interface{}, name string)
RegisterReverse registers a name in the global registry
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry for importable types
func (*Registry) NameForType ¶
NameForType retrieves the name registered for a type. If no name was registered for the given type, the second value will be false
func (*Registry) NewByName ¶
NewByName creates a new value by the name it was registered under. If no type was registered at the given name, the second value will be false
func (*Registry) RegisterReverse ¶
RegisterReverse registers a name in reverse