Fix panic when the decoding pointer type with custom decoding function#68
Fix panic when the decoding pointer type with custom decoding function#68deankarn merged 1 commit intogo-playground:masterfrom adityarsuryavamshi:fix-pointer-decoder-panic
Conversation
|
@deankarn Thank you so much for the quick response. This PR was raised to fix a specific issue I had with the pointer types. There might be other scenarios (specifically with type declarations of slices and interfaces) where the same issue might occur, I have neither ran across them nor tested for them. |
|
@deankarn It's a breaking change. see case below. |
|
@acynothia can you provide an example I can run with input 🙏 in the meantime @adityarsuryavamshi I will likely have to rollback the change. |
|
Changes have been reverted/retracted in https://github.com/go-playground/form/releases/tag/v4.2.3 until I can get an example from @acynothia that I can test this change with to try and find a way to have both work successfully. |
|
please have a glance at this case, it working well in previous version. https://go.dev/play/p/h6N0oYCZuNP |
Fixes Or Enhances
When a pointer type has a custom decoder and the decoded value is nil, we get a panic.
Example
This PR specifically handles the case for the case when the type is a pointer.
Make sure that you've checked the boxes below before you submit PR:
@go-playground/admins