Skip to content

Commit 363c11d

Browse files
committed
Refactor: Reverted back to original errors.Contains
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
1 parent 9cd9e43 commit 363c11d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/errors/errors.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,12 @@ func Contains(e1, e2 error) bool {
8181
if ce.Msg() == e2.Error() {
8282
return true
8383
}
84-
return errors.Is(ce.Err(), e2)
84+
return Contains(ce.Err(), e2)
8585
}
86-
return errors.Is(e1, e2)
86+
return e1.Error() == e2.Error()
8787
}
8888

89+
8990
// Wrap returns an Error that wrap err with wrapper.
9091
func Wrap(wrapper, err error) Error {
9192
if wrapper == nil || err == nil {

0 commit comments

Comments
 (0)