We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30d2694 commit 13d7c6fCopy full SHA for 13d7c6f
pkg/errors/errors.go
@@ -5,6 +5,7 @@ package errors
5
6
import (
7
"encoding/json"
8
+ "errors"
9
)
10
11
// Error specifies an API that must be fullfiled by error type.
@@ -80,9 +81,9 @@ func Contains(e1, e2 error) bool {
80
81
if ce.Msg() == e2.Error() {
82
return true
83
}
- return Contains(ce.Err(), e2)
84
+ return errors.Is(ce.Err(), e2)
85
- return e1.Error() == e2.Error()
86
+ return errors.Is(e1, e2)
87
88
89
// Wrap returns an Error that wrap err with wrapper.
0 commit comments