Robust enums in Go

Yet another article on the topic In a programming situation an enum should provide: self-documenting constant identifiers, easy logging, marshaling and unmarshaling, type safety, and being able to iterate over the enum values. Go does not support enums natively and some of the patterns developers use to handle enums in Go have drawbacks, as you can read in Safer Enums in Go . I've come to use a…