The Go mapping for an ASN.1 ENUMERATED type is the same as for INTEGER. By default, uint64 is used. If the ENUMERATED type contains negative-value identifiers, then int64 is used. Go constants are generated for each of the enumerated identifiers. The constant names consist of the type name concatanated with the enumerated identifier name in order to provide unique names. Note that for Go, camel-case is used in the generated identifiers and underscores are not used.
If the enumerated type is extensible, a special UNKNOWN identifier constant is added to the enumerated contant list.
If an enumerated type is referenced directly in an element within a constructed type, a compiler-generated type is generated for it consisting of the constructed type name concatanated with the element name to form a camel-cased identifer. This identifier is then used as the prefix for generated enumerated identifiers.
ASN.1:
MyEnum ::= ENUMERATED { red(0), green(1), blue(2), ... }
Generated Go code:
type MyEnum uint64 const ( MyEnumRed = 0 MyEnumGreen = 1 MyEnumBlue = 2 MyEnumUNKNOWN = 3 )