Skip to content

Commit

Permalink
Refactor: Reverted back to original errors.Contains
Browse files Browse the repository at this point in the history
Signed-off-by: nyagamunene <[email protected]>
  • Loading branch information
nyagamunene committed Jun 12, 2024
1 parent 9cd9e43 commit 363c11d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,12 @@ func Contains(e1, e2 error) bool {
if ce.Msg() == e2.Error() {
return true
}
return errors.Is(ce.Err(), e2)
return Contains(ce.Err(), e2)
}
return errors.Is(e1, e2)
return e1.Error() == e2.Error()
}


// Wrap returns an Error that wrap err with wrapper.
func Wrap(wrapper, err error) Error {
if wrapper == nil || err == nil {
Expand Down

0 comments on commit 363c11d

Please sign in to comment.