3 ms·
Ditto, surely this is better than what this blog post suggests? var Constants = struct { FooBar string FizzBuzz string
by xaduha 4y ago
Ditto, surely this is better than what this blog post suggests?
var Constants = struct {
FooBar string
FizzBuzz string
} {
"FooBar",
"FizzBuzz",
}
If you must have
type FlagID string
then this should work also
var Constants = struct {
FooBar FlagID
FizzBuzz FlagID
} {
"FooBar",
"FizzBuzz",
}