-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gen/enum: Generate <Name>_Values function #308
Conversation
Hey, thanks for implementing this. Two things:
|
As for the first question: currently there's no way of listing valid values, which makes it quite hard to do anything data driven. I'm all for not having too many top level symbols, but not being able to list values is pretty annoying, and adding it as a func on the type also seems pretty weird to me... As for renaming: it makes sense, I'll fix that. |
Any update on this? |
Hey, @recht. Since the UnmarshalText change is independent of the GetValues For the |
This generates a `Get<Name>Values` function for all enums which returns all known values for that enum.
LGTM. @bombela @prashantv can one of you have a look when you get a chance? Thanks. |
This generates a
<Name>_Values
function for all enums which returnsall known values for that enum.