Update dependencies

This commit is contained in:
eleksir
2024-07-24 22:57:56 +03:00
parent ac243bf4fd
commit 00257b8e6c
729 changed files with 47714 additions and 29066 deletions

View File

@@ -59,6 +59,13 @@ func Is(err, reference error) bool {
if tryDelegateToIsMethod(c, reference) {
return true
}
// Recursively try multi-error causes, if applicable.
for _, me := range errbase.UnwrapMulti(c) {
if Is(me, reference) {
return true
}
}
}
if err == nil {
@@ -68,8 +75,8 @@ func Is(err, reference error) bool {
return false
}
// Not directly equal. Try harder, using error marks. We don't this
// during the loop above as it may be more expensive.
// Not directly equal. Try harder, using error marks. We don't do
// this during the loop above as it may be more expensive.
//
// Note: there is a more effective recursive algorithm that ensures
// that any pair of string only gets compared once. Should the
@@ -172,6 +179,13 @@ func IsAny(err error, references ...error) bool {
return true
}
}
// Recursively try multi-error causes, if applicable.
for _, me := range errbase.UnwrapMulti(c) {
if IsAny(me, references...) {
return true
}
}
}
// Try harder with marks.