|
|
|
|
|
by amw-zero
1591 days ago
|
|
This compiles: type Test int
const (
T1 Test = 0
T2 = 1
)
func TestSomething(t Test) {}
...
TestSomething(17)
So this isn't a good suggestion, because you can easily pass any int value and will not get a compiler error. You may as well be using strings at that point. |
|
[0] https://github.com/dmarkham/enumer