-
Notifications
You must be signed in to change notification settings - Fork 95
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: Avoid pointer to slices for nullable unions. #461
Comments
@nrwiersma If you are interested, I'm happy to submit a PR with this (with tests), including hiding the new behavior behind a feature flag (like |
Sure, that would be great. I have unfortunately not had time to look at these at the moment. |
0xjac
added a commit
to 0xjac/avro
that referenced
this issue
Oct 7, 2024
Go maps and slices can be nil. An avro nullable union can thus be represented directly by a map or a slice without using an explicit pointer (`*`). This feature is hidden being the `PlainMap` and `PlainSlice` options to preserve the existing behavior. Closes hamba#461
0xjac
added a commit
to 0xjac/avro
that referenced
this issue
Oct 8, 2024
Go maps and slices can be nil. An avro nullable union can thus be represented directly by a map or a slice without using an explicit pointer (`*`). This feature is hidden being the `PlainMap` and `PlainSlice` options to preserve the existing behavior. Closes hamba#461
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related to #371 and #372, when generating a struct with a field of type
["null", "array<string>"]
it would be great if there was an option to have the resulting go type be[]string
instead of*[]string
since Go slices can benil
directly.The text was updated successfully, but these errors were encountered: