Skip to content

Commit

Permalink
Additional cleanup with Go 1.13 as minimal version
Browse files Browse the repository at this point in the history
  • Loading branch information
dsnet committed Apr 26, 2022
1 parent 63c2960 commit 50caa72
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
7 changes: 7 additions & 0 deletions cmp/cmpopts/equate.go
Expand Up @@ -6,6 +6,7 @@
package cmpopts

import (
"errors"
"math"
"reflect"
"time"
Expand Down Expand Up @@ -146,3 +147,9 @@ func areConcreteErrors(x, y interface{}) bool {
_, ok2 := y.(error)
return ok1 && ok2
}

func compareErrors(x, y interface{}) bool {
xe := x.(error)
ye := y.(error)
return errors.Is(xe, ye) || errors.Is(ye, xe)
}
16 changes: 0 additions & 16 deletions cmp/cmpopts/errors_go113.go

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
@@ -1,3 +1,3 @@
module github.com/google/go-cmp

go 1.11
go 1.13

0 comments on commit 50caa72

Please sign in to comment.