Skip to content

Commit

Permalink
remove xerrors
Browse files Browse the repository at this point in the history
Versions older than Go 1.13 are no longer in use. Remove unnecessary
dependencies.
  • Loading branch information
catatsuy committed Apr 23, 2022
1 parent 79433ac commit f4591e3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x, 1.18.x]
go-version: [1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x, 1.18.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down
19 changes: 0 additions & 19 deletions cmp/cmpopts/errors_xerrors.go

This file was deleted.

13 changes: 6 additions & 7 deletions cmp/cmpopts/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"time"

"github.com/google/go-cmp/cmp"
"golang.org/x/xerrors"
)

type (
Expand Down Expand Up @@ -531,14 +530,14 @@ func TestOptions(t *testing.T) {
reason: "user-defined EOF is not exactly equal",
}, {
label: "EquateErrors",
x: xerrors.Errorf("wrapped: %w", io.EOF),
x: fmt.Errorf("wrapped: %w", io.EOF),
y: io.EOF,
opts: []cmp.Option{EquateErrors()},
wantEqual: true,
reason: "wrapped io.EOF is equal according to errors.Is",
}, {
label: "EquateErrors",
x: xerrors.Errorf("wrapped: %w", io.EOF),
x: fmt.Errorf("wrapped: %w", io.EOF),
y: io.EOF,
wantEqual: false,
reason: "wrapped io.EOF is not equal without EquateErrors option",
Expand Down Expand Up @@ -585,14 +584,14 @@ func TestOptions(t *testing.T) {
reason: "user-defined EOF is not exactly equal",
}, {
label: "EquateErrors",
x: xerrors.Errorf("wrapped: %w", io.EOF),
x: fmt.Errorf("wrapped: %w", io.EOF),
y: io.EOF,
opts: []cmp.Option{EquateErrors()},
wantEqual: true,
reason: "wrapped io.EOF is equal according to errors.Is",
}, {
label: "EquateErrors",
x: xerrors.Errorf("wrapped: %w", io.EOF),
x: fmt.Errorf("wrapped: %w", io.EOF),
y: io.EOF,
wantEqual: false,
reason: "wrapped io.EOF is not equal without EquateErrors option",
Expand Down Expand Up @@ -639,14 +638,14 @@ func TestOptions(t *testing.T) {
reason: "user-defined EOF is not exactly equal",
}, {
label: "EquateErrors",
x: struct{ E error }{xerrors.Errorf("wrapped: %w", io.EOF)},
x: struct{ E error }{fmt.Errorf("wrapped: %w", io.EOF)},
y: struct{ E error }{io.EOF},
opts: []cmp.Option{EquateErrors()},
wantEqual: true,
reason: "wrapped io.EOF is equal according to errors.Is",
}, {
label: "EquateErrors",
x: struct{ E error }{xerrors.Errorf("wrapped: %w", io.EOF)},
x: struct{ E error }{fmt.Errorf("wrapped: %w", io.EOF)},
y: struct{ E error }{io.EOF},
wantEqual: false,
reason: "wrapped io.EOF is not equal without EquateErrors option",
Expand Down
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module github.com/google/go-cmp

go 1.11

require golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
2 changes: 0 additions & 2 deletions go.sum

This file was deleted.

0 comments on commit f4591e3

Please sign in to comment.