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
Feat: allow enum ordered const name override #1779
base: master
Are you sure you want to change the base?
Feat: allow enum ordered const name override #1779
Conversation
const.go
Outdated
func (cv *ConstVariable) VariableName() string { | ||
if ignoreNameOverride(cv.Name.Name) { | ||
return cv.Name.Name[1:] | ||
} else if overriddenName := nameOverride(cv.Comment); overriddenName != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prease remove the useless else for better reading
types.go
Outdated
return texts[1] | ||
} | ||
} | ||
} else if overriddenName := nameOverride(t.TypeSpec.Comment); overriddenName != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
@drewsilcock Please rebase and update the code. |
1443dbf
to
61ef538
Compare
Thanks for taking the time to take a look at this @ubogdan - I've rebased and updated based on the linter and your comments. |
Describe the PR
Add ability to override name of enum variant generated from ordered constant using
// @name VariantName
in the same way you can do for types.Relation issue
#1778
Additional context
N/A