Skip to content
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

Enable Fully Qualified Enum Names #170

Merged

Conversation

lukasleung
Copy link
Contributor

Addresses Issue #169.

What has Changed

  • update GoType() for the EnumDefinition to use String() which will format properly instead of Name
  • add unit tests for example provided in issue
  • run v9/test.sh also runs a go get -t -v -u ./... which updated dependencies
  • run go mod tidy

@@ -50,7 +50,7 @@ func (e *EnumDefinition) SymbolName(symbol string) string {
}

func (e *EnumDefinition) GoType() string {
return generator.ToPublicName(e.name.Name)
return generator.ToPublicName(e.name.String())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@actgardner unsure if this was intentionally using .Name instead of .String() 😅
None of the existing tests broke when I made this change so I suspect this is not impactful though would appreciate some additional context around this 👍

@actgardner
Copy link
Owner

Hey @lukasleung! Sorry for the slow response - this looks like the right behaviour. Because it changes the generated code I'll need to bump the major version to release it. Thanks for your contribution :)

@actgardner actgardner merged commit f480484 into actgardner:master Sep 11, 2021
@lukasleung lukasleung deleted the feature/fully-qualify-enum-types branch February 1, 2022 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants