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

fix field names conflicts #197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fruiting
Copy link

@fruiting fruiting commented Sep 2, 2022

Hello! I found such case:
We have field named "foo" in our schema and gogen-avro makes constructor method named NewFoo()
Also we have field named "newFoo". After code generating we have conflict of struct NewFoo and constructor method name NewFoo() from field "foo".

I made a fix for that case

@actgardner
Copy link
Owner

HI @fruiting! Thanks for the PR. I'm not open to adding any new fixed prefixes or fixed suffixes to the generated field names to avoid conflicts, because inevitably these names will conflict with someone's naming scheme. If you PRed a change to use a templated name I would be open to merging that.

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