Documentation
¶
Index ¶
Constants ¶
View Source
const ( IntUntypedOne = iota + 1 IntUntypedTwo )
View Source
const ( StringUntypedOne = "ONE" StringUntypedTwo = "TWO" )
View Source
const ( BoolUntypedTrue = true BoolUntypedFalse = false )
Variables ¶
View Source
var ( VarUntypedTrue = true VarUntypedFalse = false )
Functions ¶
This section is empty.
Types ¶
type IntTyped ¶
type IntTyped int
this file is provided as an example for int-based enums but if you instead wanted to support arbitrary english words for numbers to integers, consider github.com/will-lol/numberconverter/etoi or a similar library
func (IntTyped) MarshalJSON ¶
func (*IntTyped) UnmarshalJSON ¶
type StringTyped ¶
type StringTyped string
const ( StringTypedOne StringTyped = "ONE" StringTypedTwo StringTyped = "TWO" )
Click to show internal directories.
Click to hide internal directories.