Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
AllCaseEnums lists all 3 values in order.
var AllCases = []Case{ Stet, Upper, Lower, }
AllCases lists all 3 values in order.
Functions ¶
This section is empty.
Types ¶
type Case ¶
type Case int
func AsCase ¶
AsCase parses a string to find the corresponding Case, accepting either one of the string values or a number. The input representation is determined by caseMarshalTextRep. It wraps Parse.
func CaseOf ¶
CaseOf returns a Case based on an ordinal number. This is the inverse of Ordinal. If the ordinal is out of range, an invalid Case is returned.
func (Case) Expression ¶
func (Case) Int ¶
Int returns the int value, which is not necessarily the same as the ordinal. It serves to facilitate polymorphism (see enum.IntEnum).
func (*Case) Parse ¶
Parse parses a string to find the corresponding Case, accepting one of the string values or a number. The input representation is determined by caseMarshalTextRep. It is used by AsCase.
Usage Example
v := new(Case) err := v.Parse(s) ... etc
func (Case) String ¶
String returns the literal string representation of a Case, which is the same as the const identifier.