Documentation
¶
Overview ¶
Package enumset is enumset define provider
NOTE: must call FinishReg in init()
func init() { enumset.FinishReg() }
Index ¶
- func FindContent(e string, sets ...*EnumSet) (string, string, bool)
- func FinishReg()
- type Enum
- type EnumSet
- func (es *EnumSet) Content(e string) (string, string, bool)
- func (es *EnumSet) GetAll() []string
- func (es *EnumSet) MustReg(val string) Enum
- func (es *EnumSet) MustRegWithContent(val string, op, title string) Enum
- func (es *EnumSet) Reg(val string) (Enum, error)
- func (es *EnumSet) RegWithContent(val string, op, title string) (Enum, error)
- func (es *EnumSet) ShowAll() string
- func (es *EnumSet) ShowSorted() string
- func (es *EnumSet) Sort()
- func (es *EnumSet) Verify(e string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindContent ¶
FindContent find content from multi enumset
Types ¶
type EnumSet ¶
type EnumSet struct {
// contains filtered or unexported fields
}
EnumSet represents a set of enum
func (*EnumSet) MustRegWithContent ¶
MustRegWithContent regist a new enum with content to the set. eg ("eq", "="). It panic if val duplicate.
func (*EnumSet) RegWithContent ¶
RegWithContent regist a new enum with content to the set. eg ("eq", "=")
func (*EnumSet) ShowSorted ¶
ShowSorted show enum list of the set with sort
Click to show internal directories.
Click to hide internal directories.