mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Move deps from _workspace/ to vendor/
godep restore pushd $GOPATH/src/github.com/appc/spec git co master popd go get go4.org/errorutil rm -rf Godeps godep save ./... git add vendor git add -f $(git ls-files --other vendor/) git co -- Godeps/LICENSES Godeps/.license_file_state Godeps/OWNERS
This commit is contained in:
29
vendor/github.com/evanphx/json-patch/README.md
generated
vendored
Normal file
29
vendor/github.com/evanphx/json-patch/README.md
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
## JSON-Patch
|
||||
|
||||
Provides the abiilty to modify and test a JSON according to a
|
||||
[RFC6902 JSON patch](http://tools.ietf.org/html/rfc6902) and [RFC7386 JSON Merge Patch](https://tools.ietf.org/html/rfc7386).
|
||||
|
||||
*Version*: **1.0**
|
||||
|
||||
[](http://godoc.org/github.com/evanphx/json-patch)
|
||||
|
||||
[](https://travis-ci.org/evanphx/json-patch)
|
||||
|
||||
### API Usage
|
||||
|
||||
* Given a `[]byte`, obtain a Patch object
|
||||
|
||||
`obj, err := jsonpatch.DecodePatch(patch)`
|
||||
|
||||
* Apply the patch and get a new document back
|
||||
|
||||
`out, err := obj.Apply(doc)`
|
||||
|
||||
* Create a JSON Merge Patch document based on two json documents (a to b):
|
||||
|
||||
`mergeDoc, err := jsonpatch.CreateMergePatch(a, b)`
|
||||
|
||||
* Bonus API: compare documents for structural equality
|
||||
|
||||
`jsonpatch.Equal(doca, docb)`
|
||||
|
||||
Reference in New Issue
Block a user