Skip to content
/ delta Public

Delta copy from one struct to another and produce a JSON Patch (RFC6902) of the changes

License

Notifications You must be signed in to change notification settings

jpillora/delta

Repository files navigation

delta

Delta copy from one struct to another and produce a JSON Patch (RFC6902) of the changes

GoDev CI

Usage

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...]

TODO

  • Optimise slice diff

About

Delta copy from one struct to another and produce a JSON Patch (RFC6902) of the changes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages