fiber
fiber copied to clipboard
🐛 [Bug]: using value obtained using unexported field
Bug Description
Currently in v3 (not testet in v2): If you parse the query to an struct which has private fields you get a panic error:
using value obtained using unexported field
How to Reproduce
Steps to reproduce the behavior:
- Create a struct with private/not exported fields
- c.Bind().Query(&p) to the struct
Expected Behavior
should be throw a normal error and not panic
Fiber Version
v3.0.0-beta.4
Code Snippet (optional)
Checklist:
- [x] I agree to follow Fiber's Code of Conduct.
- [x] I have checked for existing issues that describe my problem prior to opening this one.
- [x] I understand that improperly formatted bug reports may be closed without explanation.
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord
Should be fixed with this https://github.com/gofiber/schema/pull/24 Can you test with the main branch or the latest schema version in your go.mod?
@ReneWerner87 I will check it next week!
@ReneWerner87 Where I had spontaneously taken a holiday because it was so warm. But yes, better late than never. I have tested it and it is fixed, now runs to an error message and not to a panic.