Skip to content

Commit 02e874c

Browse files
committed
prepare for v3
1 parent 0f0841e commit 02e874c

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ A library for diffing golang structures and values.
44

55
Utilizing field tags and reflection, it is able to compare two structures of the same type and create a changelog of all modified values. The produced changelog can easily be serialized to json.
66

7-
NOTE: All active development now takes place on the v2 branch.
7+
NOTE: All active development now takes place on the v3 branch.
88

99
## Installation
1010

11-
For version 2:
11+
For version 3:
1212
```
13-
go get github.com/r3labs/diff/v2
13+
go get github.com/r3labs/diff/v3
1414
```
1515

1616
## Changelog Format
@@ -84,7 +84,7 @@ In order for struct fields to be compared, they must be tagged with a given name
8484
Diffing a basic set of values can be accomplished using the diff functions. Any items that specify a "diff" tag using a name will be compared.
8585

8686
```go
87-
import "github.com/r3labs/diff/v2"
87+
import "github.com/r3labs/diff/v3"
8888

8989
type Order struct {
9090
ID string `diff:"id"`
@@ -125,7 +125,7 @@ When marshalling the changelog to json, the output will look like:
125125

126126
Options can be set on the differ at call time which effect how diff acts when building the change log.
127127
```go
128-
import "github.com/r3labs/diff/v2"
128+
import "github.com/r3labs/diff/v3"
129129

130130
type Order struct {
131131
ID string `diff:"id"`
@@ -151,7 +151,7 @@ func main() {
151151
You can also create a new instance of a differ that allows options to be set.
152152

153153
```go
154-
import "github.com/r3labs/diff/v2"
154+
import "github.com/r3labs/diff/v3"
155155

156156
type Order struct {
157157
ID string `diff:"id"`
@@ -205,7 +205,7 @@ To accommodate this patch keeps track of each change log option it attempts to a
205205
happened for further scrutiny.
206206

207207
```go
208-
import "github.com/r3labs/diff/v2"
208+
import "github.com/r3labs/diff/v3"
209209

210210
type Order struct {
211211
ID string `diff:"id"`
@@ -239,7 +239,7 @@ Instances of differ with options set can also be used when patching.
239239
```go
240240
package main
241241

242-
import "github.com/r3labs/diff/v2"
242+
import "github.com/r3labs/diff/v3"
243243

244244
type Order struct {
245245
ID string `json:"id"`
@@ -271,7 +271,7 @@ As a convenience, there is a Merge function that allows one to take three interf
271271
time.
272272

273273
```go
274-
import "github.com/r3labs/diff/v2"
274+
import "github.com/r3labs/diff/v3"
275275

276276
type Order struct {
277277
ID string `diff:"id"`

diff_examples_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"math/big"
66
"reflect"
77

8-
"github.com/r3labs/diff/v2"
8+
"github.com/r3labs/diff/v3"
99
)
1010

1111
//Try to do a bunch of stuff that will result in some or all failures

diff_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"testing"
1212
"time"
1313

14-
"github.com/r3labs/diff/v2"
14+
"github.com/r3labs/diff/v3"
1515
"github.com/stretchr/testify/assert"
1616
"github.com/stretchr/testify/require"
1717
)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/r3labs/diff/v2
1+
module github.com/r3labs/diff/v3
22

33
go 1.13
44

patch_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"testing"
66
"time"
77

8-
"github.com/r3labs/diff/v2"
8+
"github.com/r3labs/diff/v3"
99
"github.com/stretchr/testify/assert"
1010
"github.com/stretchr/testify/require"
1111
)

0 commit comments

Comments
 (0)