diff --git a/bin/test b/bin/test index 011b587..c187fda 100755 --- a/bin/test +++ b/bin/test @@ -2,6 +2,6 @@ set -e -go fmt github.com/cppforlife/go-patch/... +go fmt github.com/SUSE/go-patch/... ginkgo -trace -r patch/ diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..99684b8 --- /dev/null +++ b/go.mod @@ -0,0 +1,9 @@ +module github.com/SUSE/go-patch + +go 1.14 + +require ( + github.com/onsi/ginkgo v1.12.0 + github.com/onsi/gomega v1.9.0 + gopkg.in/yaml.v2 v2.2.8 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..89fbe64 --- /dev/null +++ b/go.sum @@ -0,0 +1,32 @@ +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU= +github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.9.0 h1:R1uwffexN6Pr340GtYRIdZmAiN4J+iw6WG4wog1DUXg= +github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwglRwMkXSBzwVbkOjLLA= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/patch/array_index_test.go b/patch/array_index_test.go index c8b7fb7..ff8c6f4 100644 --- a/patch/array_index_test.go +++ b/patch/array_index_test.go @@ -4,7 +4,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - . "github.com/cppforlife/go-patch/patch" + . "github.com/SUSE/go-patch/patch" ) var _ = Describe("ArrayIndex", func() { diff --git a/patch/array_insertion_test.go b/patch/array_insertion_test.go index a987d36..08debcc 100644 --- a/patch/array_insertion_test.go +++ b/patch/array_insertion_test.go @@ -4,7 +4,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - . "github.com/cppforlife/go-patch/patch" + . "github.com/SUSE/go-patch/patch" ) var _ = Describe("ArrayInsertion", func() { diff --git a/patch/copy_op.go b/patch/copy_op.go new file mode 100644 index 0000000..e1945f5 --- /dev/null +++ b/patch/copy_op.go @@ -0,0 +1,15 @@ +package patch + +type QCopyOp struct { + Path Pointer + From Pointer +} + +func (op QCopyOp) Apply(doc interface{}) (interface{}, error) { + value, err := FindOp{Path: op.From}.Apply(doc) + if err != nil { + return nil, err + } + + return ReplaceOp{Path: op.Path, Value: value}.Apply(doc) +} diff --git a/patch/copy_op_test.go b/patch/copy_op_test.go new file mode 100644 index 0000000..618dcc6 --- /dev/null +++ b/patch/copy_op_test.go @@ -0,0 +1,41 @@ +package patch_test + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + + . "github.com/SUSE/go-patch/patch" +) + +var _ = Describe("QCopyOp.Apply", func() { + Describe("array item", func() { + It("replaces array item", func() { + res, err := QCopyOp{ + Path: MustNewPointerFromString("/-"), + From: MustNewPointerFromString("/0"), + }.Apply([]interface{}{1, 2, 3}) + Expect(err).ToNot(HaveOccurred()) + Expect(res).To(Equal([]interface{}{1, 2, 3, 1})) + }) + }) + + Describe("map key", func() { + It("copies map key", func() { + doc := map[interface{}]interface{}{ + "abc": "abc", + "xyz": "xyz", + } + + res, err := QCopyOp{ + From: MustNewPointerFromString("/abc"), + Path: MustNewPointerFromString("/def?"), + }.Apply(doc) + Expect(err).ToNot(HaveOccurred()) + Expect(res).To(Equal(map[interface{}]interface{}{ + "abc": "abc", + "def": "abc", + "xyz": "xyz", + })) + }) + }) +}) diff --git a/patch/diff_test.go b/patch/diff_test.go index df8b009..8537a03 100644 --- a/patch/diff_test.go +++ b/patch/diff_test.go @@ -4,7 +4,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - . "github.com/cppforlife/go-patch/patch" + . "github.com/SUSE/go-patch/patch" ) var _ = Describe("Diff.Calculate", func() { diff --git a/patch/find_op_test.go b/patch/find_op_test.go index 7aa0d13..230e06c 100644 --- a/patch/find_op_test.go +++ b/patch/find_op_test.go @@ -4,7 +4,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - . "github.com/cppforlife/go-patch/patch" + . "github.com/SUSE/go-patch/patch" ) var _ = Describe("FindOp.Apply", func() { diff --git a/patch/integration_test.go b/patch/integration_test.go index a4e8ae6..7c04a31 100644 --- a/patch/integration_test.go +++ b/patch/integration_test.go @@ -5,7 +5,7 @@ import ( . "github.com/onsi/gomega" "gopkg.in/yaml.v2" - . "github.com/cppforlife/go-patch/patch" + . "github.com/SUSE/go-patch/patch" ) var _ = Describe("Integration", func() { diff --git a/patch/move_op.go b/patch/move_op.go new file mode 100644 index 0000000..1bd8ee8 --- /dev/null +++ b/patch/move_op.go @@ -0,0 +1,19 @@ +package patch + +type QMoveOp struct { + Path Pointer + From Pointer +} + +func (op QMoveOp) Apply(doc interface{}) (interface{}, error) { + value, err := FindOp{Path: op.From}.Apply(doc) + if err != nil { + return nil, err + } + + doc, err = ReplaceOp{Path: op.Path, Value: value}.Apply(doc) + if err != nil { + return nil, err + } + return RemoveOp{Path: op.From}.Apply(doc) +} diff --git a/patch/move_op_test.go b/patch/move_op_test.go new file mode 100644 index 0000000..c7dd158 --- /dev/null +++ b/patch/move_op_test.go @@ -0,0 +1,40 @@ +package patch_test + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + + . "github.com/SUSE/go-patch/patch" +) + +var _ = Describe("QMoveOp.Apply", func() { + Describe("array item", func() { + It("moves array item", func() { + res, err := QMoveOp{ + Path: MustNewPointerFromString("/-"), + From: MustNewPointerFromString("/0"), + }.Apply([]interface{}{1, 2, 3}) + Expect(err).ToNot(HaveOccurred()) + Expect(res).To(Equal([]interface{}{2, 3, 1})) + }) + }) + + Describe("map key", func() { + It("renames map key", func() { + doc := map[interface{}]interface{}{ + "abc": "abc", + "xyz": "xyz", + } + + res, err := QMoveOp{ + From: MustNewPointerFromString("/abc"), + Path: MustNewPointerFromString("/def?"), + }.Apply(doc) + Expect(err).ToNot(HaveOccurred()) + Expect(res).To(Equal(map[interface{}]interface{}{ + "def": "abc", + "xyz": "xyz", + })) + }) + }) +}) diff --git a/patch/op_definition.go b/patch/op_definition.go index 3b165fc..d143388 100644 --- a/patch/op_definition.go +++ b/patch/op_definition.go @@ -10,6 +10,7 @@ import ( type OpDefinition struct { Type string `json:",omitempty" yaml:",omitempty"` Path *string `json:",omitempty" yaml:",omitempty"` + From *string `json:",omitempty" yaml:",omitempty"` Value *interface{} `json:",omitempty" yaml:",omitempty"` Absent *bool `json:",omitempty" yaml:",omitempty"` Error *string `json:",omitempty" yaml:",omitempty"` @@ -46,6 +47,18 @@ func NewOpsFromDefinitions(opDefs []OpDefinition) (Ops, error) { return nil, fmt.Errorf("Test operation [%d]: %s within\n%s", i, err, opFmt) } + case "qcopy": + op, err = p.newQCopyOp(opDef) + if err != nil { + return nil, fmt.Errorf("QCopy operation [%d]: %s within\n%s", i, err, opFmt) + } + + case "qmove": + op, err = p.newQMoveOp(opDef) + if err != nil { + return nil, fmt.Errorf("QMove operation [%d]: %s within\n%s", i, err, opFmt) + } + default: return nil, fmt.Errorf("Unknown operation [%d] with type '%s' within\n%s", i, opDef.Type, opFmt) } @@ -121,6 +134,58 @@ func (parser) newTestOp(opDef OpDefinition) (TestOp, error) { return op, nil } +func (parser) newQCopyOp(opDef OpDefinition) (QCopyOp, error) { + if opDef.Path == nil { + return QCopyOp{}, fmt.Errorf("Missing path") + } + + if opDef.From == nil { + return QCopyOp{}, fmt.Errorf("Missing from") + } + + if opDef.Value != nil { + return QCopyOp{}, fmt.Errorf("Cannot specify value") + } + + pathPtr, err := NewPointerFromString(*opDef.Path) + if err != nil { + return QCopyOp{}, fmt.Errorf("Invalid path: %s", err) + } + + fromPtr, err := NewPointerFromString(*opDef.From) + if err != nil { + return QCopyOp{}, fmt.Errorf("Invalid from: %s", err) + } + + return QCopyOp{Path: pathPtr, From: fromPtr}, nil +} + +func (parser) newQMoveOp(opDef OpDefinition) (QMoveOp, error) { + if opDef.Path == nil { + return QMoveOp{}, fmt.Errorf("Missing path") + } + + if opDef.From == nil { + return QMoveOp{}, fmt.Errorf("Missing from") + } + + if opDef.Value != nil { + return QMoveOp{}, fmt.Errorf("Cannot specify value") + } + + pathPtr, err := NewPointerFromString(*opDef.Path) + if err != nil { + return QMoveOp{}, fmt.Errorf("Invalid path: %s", err) + } + + fromPtr, err := NewPointerFromString(*opDef.From) + if err != nil { + return QMoveOp{}, fmt.Errorf("Invalid from: %s", err) + } + + return QMoveOp{Path: pathPtr, From: fromPtr}, nil +} + func (parser) fmtOpDef(opDef OpDefinition) string { var ( redactedVal interface{} = "" @@ -180,6 +245,26 @@ func NewOpDefinitionsFromOps(ops Ops) ([]OpDefinition, error) { opDefs = append(opDefs, opDef) + case QCopyOp: + path := typedOp.Path.String() + from := typedOp.From.String() + + opDefs = append(opDefs, OpDefinition{ + Type: "qcopy", + Path: &path, + From: &from, + }) + + case QMoveOp: + path := typedOp.Path.String() + from := typedOp.From.String() + + opDefs = append(opDefs, OpDefinition{ + Type: "qmove", + Path: &path, + From: &from, + }) + default: return nil, fmt.Errorf("Unknown operation [%d] with type '%t'", i, op) } diff --git a/patch/op_definition_test.go b/patch/op_definition_test.go index 062bd9d..023de7e 100644 --- a/patch/op_definition_test.go +++ b/patch/op_definition_test.go @@ -7,25 +7,29 @@ import ( . "github.com/onsi/gomega" "gopkg.in/yaml.v2" - . "github.com/cppforlife/go-patch/patch" + . "github.com/SUSE/go-patch/patch" ) var _ = Describe("NewOpsFromDefinitions", func() { var ( path = "/abc" + from = "/abc" invalidPath = "abc" + invalidFrom = "abc" errorMsg = "error" val interface{} = 123 complexVal interface{} = map[interface{}]interface{}{123: 123} trueBool = true ) - It("supports 'replace', 'remove', 'test' operations", func() { + It("supports 'replace', 'remove', 'test', 'qcopy', 'qmove' operations", func() { opDefs := []OpDefinition{ {Type: "replace", Path: &path, Value: &val}, {Type: "remove", Path: &path}, {Type: "test", Path: &path, Value: &val}, {Type: "test", Path: &path, Absent: &trueBool}, + {Type: "qcopy", Path: &path, From: &from}, + {Type: "qmove", Path: &path, From: &from}, } ops, err := NewOpsFromDefinitions(opDefs) @@ -36,6 +40,8 @@ var _ = Describe("NewOpsFromDefinitions", func() { RemoveOp{Path: MustNewPointerFromString("/abc")}, TestOp{Path: MustNewPointerFromString("/abc"), Value: 123}, TestOp{Path: MustNewPointerFromString("/abc"), Absent: true}, + QCopyOp{Path: MustNewPointerFromString("/abc"), From: MustNewPointerFromString("/abc")}, + QMoveOp{Path: MustNewPointerFromString("/abc"), From: MustNewPointerFromString("/abc")}, }))) }) @@ -199,18 +205,132 @@ var _ = Describe("NewOpsFromDefinitions", func() { "Type": "test", "Path": "abc", "Value": "" +}`)) + }) + }) + + Describe("qcopy", func() { + It("requires path", func() { + _, err := NewOpsFromDefinitions([]OpDefinition{{Type: "qcopy", From: &from}}) + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(`QCopy operation [0]: Missing path within +{ + "Type": "qcopy", + "From": "/abc" +}`)) + }) + + It("requires from", func() { + _, err := NewOpsFromDefinitions([]OpDefinition{{Type: "qcopy", Path: &path}}) + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(`QCopy operation [0]: Missing from within +{ + "Type": "qcopy", + "Path": "/abc" +}`)) + }) + + It("does not allow value", func() { + _, err := NewOpsFromDefinitions([]OpDefinition{{Type: "qcopy", Path: &path, From: &from, Value: &val}}) + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(`QCopy operation [0]: Cannot specify value within +{ + "Type": "qcopy", + "Path": "/abc", + "From": "/abc", + "Value": "" +}`)) + }) + + It("requires valid path", func() { + _, err := NewOpsFromDefinitions([]OpDefinition{{Type: "qcopy", Path: &invalidPath, From: &from}}) + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(`QCopy operation [0]: Invalid path: Expected to start with '/' within +{ + "Type": "qcopy", + "Path": "abc", + "From": "/abc" +}`)) + }) + + It("requires valid from", func() { + _, err := NewOpsFromDefinitions([]OpDefinition{{Type: "qcopy", Path: &path, From: &invalidFrom}}) + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(`QCopy operation [0]: Invalid from: Expected to start with '/' within +{ + "Type": "qcopy", + "Path": "/abc", + "From": "abc" +}`)) + }) + }) + + Describe("qmove", func() { + It("requires path", func() { + _, err := NewOpsFromDefinitions([]OpDefinition{{Type: "qmove", From: &from}}) + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(`QMove operation [0]: Missing path within +{ + "Type": "qmove", + "From": "/abc" +}`)) + }) + + It("requires from", func() { + _, err := NewOpsFromDefinitions([]OpDefinition{{Type: "qmove", Path: &path}}) + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(`QMove operation [0]: Missing from within +{ + "Type": "qmove", + "Path": "/abc" +}`)) + }) + + It("does not allow value", func() { + _, err := NewOpsFromDefinitions([]OpDefinition{{Type: "qmove", Path: &path, From: &from, Value: &val}}) + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(`QMove operation [0]: Cannot specify value within +{ + "Type": "qmove", + "Path": "/abc", + "From": "/abc", + "Value": "" +}`)) + }) + + It("requires valid path", func() { + _, err := NewOpsFromDefinitions([]OpDefinition{{Type: "qmove", Path: &invalidPath, From: &from}}) + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(`QMove operation [0]: Invalid path: Expected to start with '/' within +{ + "Type": "qmove", + "Path": "abc", + "From": "/abc" +}`)) + }) + + It("requires valid from", func() { + _, err := NewOpsFromDefinitions([]OpDefinition{{Type: "qmove", Path: &path, From: &invalidFrom}}) + Expect(err).To(HaveOccurred()) + Expect(err.Error()).To(Equal(`QMove operation [0]: Invalid from: Expected to start with '/' within +{ + "Type": "qmove", + "Path": "/abc", + "From": "abc" }`)) }) }) }) var _ = Describe("NewOpDefinitionsFromOps", func() { - It("supports 'replace', 'remove', 'test' operations serialized", func() { + It("supports 'replace', 'remove', 'test', 'qcopy', 'qmove' operations serialized", func() { ops := Ops([]Op{ ReplaceOp{Path: MustNewPointerFromString("/abc"), Value: 123}, RemoveOp{Path: MustNewPointerFromString("/abc")}, TestOp{Path: MustNewPointerFromString("/abc"), Value: 123}, TestOp{Path: MustNewPointerFromString("/abc"), Absent: true}, + QCopyOp{Path: MustNewPointerFromString("/abc"), From: MustNewPointerFromString("/abc")}, + QMoveOp{Path: MustNewPointerFromString("/abc"), From: MustNewPointerFromString("/abc")}, }) opDefs, err := NewOpDefinitionsFromOps(ops) @@ -218,7 +338,6 @@ var _ = Describe("NewOpDefinitionsFromOps", func() { bs, err := yaml.Marshal(opDefs) Expect(err).ToNot(HaveOccurred()) - Expect("\n" + string(bs)).To(Equal(` - type: replace path: /abc @@ -231,6 +350,12 @@ var _ = Describe("NewOpDefinitionsFromOps", func() { - type: test path: /abc absent: true +- type: qcopy + path: /abc + from: /abc +- type: qmove + path: /abc + from: /abc `)) bs, err = json.MarshalIndent(opDefs, "", " ") @@ -253,6 +378,16 @@ var _ = Describe("NewOpDefinitionsFromOps", func() { "Type": "test", "Path": "/abc", "Absent": true + }, + { + "Type": "qcopy", + "Path": "/abc", + "From": "/abc" + }, + { + "Type": "qmove", + "Path": "/abc", + "From": "/abc" } ]`)) }) diff --git a/patch/ops_test.go b/patch/ops_test.go index 1e4ac93..8f4a1a1 100644 --- a/patch/ops_test.go +++ b/patch/ops_test.go @@ -6,7 +6,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - . "github.com/cppforlife/go-patch/patch" + . "github.com/SUSE/go-patch/patch" ) var _ = Describe("Ops.Apply", func() { diff --git a/patch/pointer_test.go b/patch/pointer_test.go index 36c4aa2..4994097 100644 --- a/patch/pointer_test.go +++ b/patch/pointer_test.go @@ -6,7 +6,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - . "github.com/cppforlife/go-patch/patch" + . "github.com/SUSE/go-patch/patch" ) type PointerTestCase struct { diff --git a/patch/remove_op_test.go b/patch/remove_op_test.go index fa8081c..ab6b2f1 100644 --- a/patch/remove_op_test.go +++ b/patch/remove_op_test.go @@ -4,7 +4,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - . "github.com/cppforlife/go-patch/patch" + . "github.com/SUSE/go-patch/patch" ) var _ = Describe("RemoveOp.Apply", func() { diff --git a/patch/replace_op_test.go b/patch/replace_op_test.go index c3f628f..9e2f046 100644 --- a/patch/replace_op_test.go +++ b/patch/replace_op_test.go @@ -4,7 +4,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - . "github.com/cppforlife/go-patch/patch" + . "github.com/SUSE/go-patch/patch" ) var _ = Describe("ReplaceOp.Apply", func() { diff --git a/patch/test_op_test.go b/patch/test_op_test.go index c57bbe5..4aff1a3 100644 --- a/patch/test_op_test.go +++ b/patch/test_op_test.go @@ -4,7 +4,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - . "github.com/cppforlife/go-patch/patch" + . "github.com/SUSE/go-patch/patch" ) var _ = Describe("TestOp.Apply", func() { diff --git a/patch/yaml_compat_test.go b/patch/yaml_compat_test.go index 2e7e267..f873a88 100644 --- a/patch/yaml_compat_test.go +++ b/patch/yaml_compat_test.go @@ -5,7 +5,7 @@ import ( . "github.com/onsi/gomega" "gopkg.in/yaml.v2" - . "github.com/cppforlife/go-patch/patch" + . "github.com/SUSE/go-patch/patch" ) var _ = Describe("YAML compatibility", func() {