awesome-patterns/idiom/iota_const/main.go
2018-01-19 09:28:56 +10:00

23 lines
368 B
Go

package main
import "github.com/davecgh/go-spew/spew"
type FeedLockLinkType int
const (
Racing FeedLockLinkType = iota
Market
)
var feedLockLinkTypes = [...]string{
"racing.Races.raceID",
"racing.Markets.marketID",
}
func (f FeedLockLinkType) String() string { return feedLockLinkTypes[f] }
func main() {
test := FeedLockLinkType(Racing)
spew.Dump(test)
}