Skip to content

Commit

Permalink
整理
Browse files Browse the repository at this point in the history
  • Loading branch information
mooncake9527 committed Sep 24, 2024
1 parent 5b9a53d commit f53e45d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xerrors/xerror/xerror_api_stack.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package xerror

import (
"errors"
"runtime"
)

Expand Down Expand Up @@ -90,6 +91,9 @@ func Is(err, target error) bool {
if err.Error() == target.Error() {
return true
}
if errors.Is(err, target) {
return true
}
if e, ok := err.(IIs); ok {
return e.Is(target)
}
Expand Down

0 comments on commit f53e45d

Please sign in to comment.