From 2d06845ef2f0fb7fb5742411acc1c3bddc3f6b98 Mon Sep 17 00:00:00 2001 From: Jamie Edge Date: Sat, 24 Dec 2022 11:18:50 +0000 Subject: [PATCH] docs: fix typo and improve consistency of comment for Error.Unwrap --- retry.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/retry.go b/retry.go index 1182fc0..84df967 100644 --- a/retry.go +++ b/retry.go @@ -228,8 +228,8 @@ func (e Error) As(target interface{}) bool { } /* -Unwrap the last error for compatible with the `errors.Unwrap()` -when you need unwrap all erros, you should use `WrappedErrors()` instead +Unwrap the last error for compatibility with `errors.Unwrap()`. +When you need to unwrap all errors, you should use `WrappedErrors()` instead. err := Do( func() error { @@ -240,7 +240,7 @@ when you need unwrap all erros, you should use `WrappedErrors()` instead fmt.Println(errors.Unwrap(err)) # "original error" is printed -added in version 4.2.0 +Added in version 4.2.0. */ func (e Error) Unwrap() error { return e[len(e)-1]