Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix typo and improve consistency of comment for Error.Unwrap #82

Merged
merged 1 commit into from Jan 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions retry.go
Expand Up @@ -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 {
Expand All @@ -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]
Expand Down