You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
golang packages like enumer provide the ability to convert enum values from string to numeric values by implementing the standard TextUnmarshaler interface. In fact, the JSON encoder/decoder will fall back to this interface if the json.Unmarshaler interface isn't implemented.
Is there any reason not to implement this interface for proto enums? I'd be happy to provide a PR.
The text was updated successfully, but these errors were encountered:
Currently, the way to translate an enum value from string to the corresponding numeric value seems to be something like this:
This is pretty cumbersome.
golang packages like enumer provide the ability to convert enum values from string to numeric values by implementing the standard TextUnmarshaler interface. In fact, the JSON encoder/decoder will fall back to this interface if the json.Unmarshaler interface isn't implemented.
Is there any reason not to implement this interface for proto enums? I'd be happy to provide a PR.
The text was updated successfully, but these errors were encountered: