mennanov / fieldmask-utils

Protobuf Field Mask Go utils
MIT License
229 stars 26 forks source link

Not copying anypb correctly? #21

Closed artificial-james closed 2 years ago

artificial-james commented 2 years ago

I don't believe StructToStruct is handling anypb correctly. Take a look at the attached patch: any_existing.patch.txt

It appears to be copying other fields. Notice the ExtraUser Role field has changed even though it isn't included in the mask.

Edit: Also, the ExtraUser Name field should be unchanged (since it isn't included in the mask), but is changing to "username".

mennanov commented 2 years ago

This is clearly a bug. Thanks for reporting. Now fixed.