diff --git a/.travis.yml b/.travis.yml index 9e4597b..0066aaa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,11 +7,12 @@ go_import_path: gomodules.xyz/jsonpatch cache: directories: - - $HOME/.cache/go-build - - $GOPATH/pkg/mod + - $HOME/.cache/go-build + - $GOPATH/pkg/mod env: - GO111MODULE=on script: - - go test -v + - cd v2 + - go test -v diff --git a/README.md b/README.md index 2ea21f8..8b2c21d 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,7 @@ JSON Patch allows you to generate JSON that describes changes you want to make t ## Usage ## ```go -import "gomodules.xyz/jsonpatch/v2" // with go modules enabled (GO111MODULE=on or outside GOPATH) -import "gomodules.xyz/jsonpatch" // with go modules disabled +import "gomodules.xyz/jsonpatch/v2" ``` I tried some of the other "jsonpatch" go implementations, but none of them could diff two json documents and generate format like jsonpatch.com specifies. Here's an example of the patch format: diff --git a/go.mod b/v2/go.mod similarity index 100% rename from go.mod rename to v2/go.mod diff --git a/go.sum b/v2/go.sum similarity index 100% rename from go.sum rename to v2/go.sum diff --git a/jsonpatch.go b/v2/jsonpatch.go similarity index 100% rename from jsonpatch.go rename to v2/jsonpatch.go diff --git a/jsonpatch_json_test.go b/v2/jsonpatch_json_test.go similarity index 100% rename from jsonpatch_json_test.go rename to v2/jsonpatch_json_test.go diff --git a/jsonpatch_test.go b/v2/jsonpatch_test.go similarity index 100% rename from jsonpatch_test.go rename to v2/jsonpatch_test.go