mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-13 11:59:35 +03:00
DNS: Fix some bugs; Refactors; Optimizations (#4659)
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package errors
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@ -36,12 +37,12 @@ func AllEqual(expected error, actual error) bool {
|
||||
return false
|
||||
}
|
||||
for _, err := range errs {
|
||||
if err != expected {
|
||||
if !errors.Is(err, expected) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
default:
|
||||
return errs == expected
|
||||
return errors.Is(errs, expected)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user