mirror of
https://github.com/crazybber/awesome-patterns.git
synced 2024-11-28 07:46:03 +03:00
23 lines
377 B
Go
23 lines
377 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).String()
|
|
spew.Dump(test)
|
|
}
|