2 ms·
Isn't this what Unwrap() is for? errors.Is calls Unwrap if it's available and then compares _that_ error.
by cronelius 1y ago
Isn't this what Unwrap() is for? errors.Is calls Unwrap if it's available and then compares _that_ error.
- eik 1y agoYes, but “an Is method should only shallowly compare err and the target and not call Unwrap on either”: https://pkg.go.dev/errors#Is https://pkg.go.dev/errors#Is