MaskMerge
implements merging of two protocol buffer messages as specified by the FieldMask documentation.
go get github.com/iterate/maskmerge
Feed MaskMerge
with a proto.Message
to update, a proto.Message
to read values from, and a fieldmaskpb.FieldMask
.
See example_test.go
for a full example.
maskmerge.MaskMerge(dst, src, mask)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.