Enums are not strictly built-in to the go language, but you can easily emulate them using this simple pattern. This is encouraged and used in go's standard library.
type Base int
const (
A Base = iota
C
T
G
)
Enums are not strictly built-in to the go language, but you can easily emulate them using this simple pattern. This is encouraged and used in go's standard library.
type Base int
const (
A Base = iota
C
T
G
)