diff options
Diffstat (limited to 'libgo/go/errors/errors.go')
-rw-r--r-- | libgo/go/errors/errors.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libgo/go/errors/errors.go b/libgo/go/errors/errors.go index 85d4260762e..d923ad4b703 100644 --- a/libgo/go/errors/errors.go +++ b/libgo/go/errors/errors.go @@ -13,16 +13,16 @@ // // If e.Unwrap() returns a non-nil error w, then we say that e wraps w. // +// Unwrap unpacks wrapped errors. If its argument's type has an +// Unwrap method, it calls the method once. Otherwise, it returns nil. +// // A simple way to create wrapped errors is to call fmt.Errorf and apply the %w verb // to the error argument: // -// fmt.Errorf("... %w ...", ..., err, ...).Unwrap() +// errors.Unwrap(fmt.Errorf("... %w ...", ..., err, ...)) // // returns err. // -// Unwrap unpacks wrapped errors. If its argument's type has an -// Unwrap method, it calls the method once. Otherwise, it returns nil. -// // Is unwraps its first argument sequentially looking for an error that matches the // second. It reports whether it finds a match. It should be used in preference to // simple equality checks: |