Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Non-existing variable of type slice of structs is mapped to an empty slice instead of nil #320

Closed
tyxeron opened this issue Aug 5, 2024 · 2 comments · Fixed by #321
Closed
Assignees
Labels

Comments

@tyxeron
Copy link

tyxeron commented Aug 5, 2024

Hey there

Thanks for your awesome library 👍

I wanted to update to v11.2.0 and I noticed that the recent change (#312) changed the semantics regarding slices of structs. The problem is that a non-existing of type []someStruct is mapped to an empty slice instead of the prior behavior (as well as with slices of primitive types) where it is mapped to nil.

@caarlos0
Copy link
Owner

caarlos0 commented Aug 6, 2024

oh, good catch, see #321

thanks!

@tyxeron
Copy link
Author

tyxeron commented Aug 7, 2024

Thanks for the prompt reponse 🙏

@tyxeron tyxeron closed this as completed Aug 7, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants