aboutsummaryrefslogtreecommitdiff
path: root/src/errors
diff options
context:
space:
mode:
Diffstat (limited to 'src/errors')
-rw-r--r--src/errors/wrap.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/errors/wrap.go b/src/errors/wrap.go
index 62332b1a88..760a08a4ef 100644
--- a/src/errors/wrap.go
+++ b/src/errors/wrap.go
@@ -8,8 +8,9 @@ import (
"internal/reflectlite"
)
-// Unwrap returns the result of calling the Unwrap method on err, if err
-// implements Wrapper. Otherwise, Unwrap returns nil.
+// Unwrap returns the result of calling the Unwrap method on err, if err's
+// type contains an Unwrap method returning error.
+// Otherwise, Unwrap returns nil.
func Unwrap(err error) error {
u, ok := err.(interface {
Unwrap() error