os: fix reference to nonexistent errors.Wrapper

Change-Id: I857d39486cbddbbee0c00fd45eb77f21488f4806
GitHub-Last-Rev: 1b500183cf
GitHub-Pull-Request: golang/go#35399
Reviewed-on: https://go-review.googlesource.com/c/go/+/205602
Reviewed-by: Jonathan Amsterdam <jba@google.com>
This commit is contained in:
Benjamin Peterson 2019-11-06 17:54:32 +00:00 committed by Ian Lance Taylor
parent 61ef6a39dd
commit e3a7d6c297

View file

@ -110,7 +110,7 @@ func IsTimeout(err error) bool {
func underlyingErrorIs(err, target error) bool {
// Note that this function is not errors.Is:
// underlyingError only unwraps the specific error-wrapping types
// that it historically did, not all errors.Wrapper implementations.
// that it historically did, not all errors implementing Unwrap().
err = underlyingError(err)
if err == target {
return true