Delta copy from one struct to another and produce a JSON Patch (RFC6902) of the changes
dst := &MyType{...}
src := &MyType{...}
patch, err := delta.CopyPatch(dst, src)
if err != nil {
return err
}
// dst is now JSON-equivalent to src
// patch is [...RFC6902 operations...]
- Optimise slice diff