-
Notifications
You must be signed in to change notification settings - Fork 17
Support anonymous struct fields #91
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
base: master
Are you sure you want to change the base?
Conversation
|
Oups, it seems "address" property has been added 2 times even with my condition. Sorry, will push a fix commit. The fact is my example stands with a weird Person structure since multiple Anonymous structs that targets "Address" property, but better to fix that just in case ^^ |
|
Second commit solves the previous issue. I correctly get the following after By the way, in case the property |
|
Note that all tests within your Go module was working well, but it does not when trying to compile my own executable and then try into another Go module directory. I was always having: And I just figured out I had to use this replacement: into my other directories because you use a temporary generated Go file that will by default use your package. I don't know if you had an easier way to develop locally. Hope this tip will help others. In the meantime, I hope this will be merged to avoid dealing with the |
…ting properties and their type
|
@rogpeppe @sixstone-qq , any chance this to be reviewed? (I know that's holidays, but just asking 😃 , thank you) |
|
Update: I definitely move to Protobuf codec for Kafka, too many complications within the Avro ecosystem from my point of view 😞 |
Solves issue #40
Testing
About testing, I tried with this original Go file:
And the command:
It gives me this result:
And if then I use the
avrogoto see if it parses correctly, I indeed end up with this final structure:Improvements
I took a look at your tests but to be honest not totally confident about how to implement this with yours. Feel free to add those 👍
Thank you,