Documentation
¶
Index ¶
- type Enum
- func (e Enum) Alias(value int) (string, bool)
- func (e Enum) Aliases() []string
- func (e Enum) MustAlias(value int) string
- func (e Enum) MustName(value int) string
- func (e Enum) MustValue(name string) int
- func (e Enum) MustValueForAlias(alias string) int
- func (e Enum) Name(value int) (string, bool)
- func (e Enum) NameValues() map[int]string
- func (e Enum) Names() []string
- func (e Enum) Value(name string) (int, bool)
- func (e Enum) ValueForAlias(alias string) (int, bool)
- func (e Enum) Values() []int
- type Enumerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Enum ¶
type Enum struct {
// contains filtered or unexported fields
}
struct value of Enum
func EnumerateStruct ¶
func EnumerateStruct(target interface{}) Enum
Convert an argument 'target' to goenum.Enum
func (Enum) MustValueForAlias ¶
Return the value for given alias. panic() if not found.
func (Enum) ValueForAlias ¶
Return the value for given alias. Returns -1 and false if not found.
type Enumerator ¶
type Enumerator interface {
Enum() Enum
}
Click to show internal directories.
Click to hide internal directories.