proposal: encoding/asn1: add "enum" keyword for TagEnum #28873
Labels
FrozenDueToAge
Proposal
Proposal-Crypto
Proposal related to crypto packages or other security issues
Projects
Milestone
Adding an "enum" tag option helps keeping the code clean.
for example:
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.
The text was updated successfully, but these errors were encountered: