Documentation
¶
Overview ¶
Package xiota provides tools for creating and handling iota-like enumerated constants.
type Month int
const (
January Month = iota + 1
February
March
// ...and so on
)
var longMonthNames = []string{
"January", "February", "March",
// ...and so on
}
// Implement fmt.Stringer interface with just one line
func (m Month) String() string {
return Format(m, longMonthNames, January, December, January-1)
}
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.