I understand that the idiomatic way to create an enum in GO is as follows:
type topicStatus int const ( registered topicStatus = iota active inactive pending-removal removed )
but if I have another "enumeration" that wants to "reuse" the name, I get an error:
type hotelVisit int const ( registered hotelVisit = iota checked-in checked-out )
Here, if I try this, I cannot distinguish between the topic Status.registered and hotelVisit.registered, since "registered" was previously registered - is there a way to "namespace" the names "enum"?
source share