Skip to content

Commit f144a35

Browse files
authored
Additional cleanup with Go 1.13 as minimal version (#295)
1 parent 63c2960 commit f144a35

File tree

3 files changed

+8
-17
lines changed

3 files changed

+8
-17
lines changed

cmp/cmpopts/equate.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
package cmpopts
77

88
import (
9+
"errors"
910
"math"
1011
"reflect"
1112
"time"
@@ -146,3 +147,9 @@ func areConcreteErrors(x, y interface{}) bool {
146147
_, ok2 := y.(error)
147148
return ok1 && ok2
148149
}
150+
151+
func compareErrors(x, y interface{}) bool {
152+
xe := x.(error)
153+
ye := y.(error)
154+
return errors.Is(xe, ye) || errors.Is(ye, xe)
155+
}

cmp/cmpopts/errors_go113.go

Lines changed: 0 additions & 16 deletions
This file was deleted.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/google/go-cmp
22

3-
go 1.11
3+
go 1.13

0 commit comments

Comments
 (0)