Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove xerrors dependency #292

Merged
merged 1 commit into from
Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.