Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
proposal: encoding/asn1: add "enum" keyword for TagEnum #28873
Adding an "enum" tag option helps keeping the code clean.
the following code:
as compared to
note the enumStruct is completely redundant and is used solely for getting an enum tag in the buffer
Same goes for Unmarshal, you need an intermediate structure if you want to have you own enumerated types.