Closed cdennig closed 3 years ago
Hi @cdennig
Thanks for sending the fix! I'll get this merged now and cut a release.
I think v2 is still missing the fixes, @purehyperbole.
@cdennig My bad, I forgot to check the branch I was merging into :facepalm:
I'll fix this now and create a new tag
@cdennig Your fix should now be available on v2.9.1. Thanks again!
go get github.com/r3labs/diff/v2@v2.9.1
Thanks a lot! 🙏
…g before the actual field
There is an error when flagging a field with a "-" tag in combination with patching, so that a patch to a field is not applied although it should be. Here's an example of the current behavior:
The problem is: when the field tagged with "-" is found before the actual field to patch, the whole change is flagged "immutable", see patch_struct.go
The PR fixes that behavior.