-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
In the release notes it says value collision should be handled like this:
// Defines values for Enum1.
const (
Enum1One Enum1 = "One"
Enum1Three Enum1 = "Three"
Enum1Two Enum1 = "Two"
)
// Defines values for Enum2.
const (
Enum2One Enum2 = "One"
Enum2Three Enum2 = "Three"
Enum2Two Enum2 = "Two"
)
However, in my project it is handled like this
// Defines values for Enum1.
const (
One Enum1 = "One"
Three Enum1 = "Three"
Two Enum1 = "Two"
)
// Defines values for Enum2.
const (
Enum2One Enum2 = "One"
Enum2Three Enum2 = "Three"
Enum2Two Enum2 = "Two"
)
If colliding, a prefix is appended, but this creates inconsistency in my code. Not even sure if this will be generated the same way each time or if this can end up being swapped at one point.