Skip to content

Commit

Permalink
Merge pull request #82 from JamieEdge/fix-error-unwrap-godoc
Browse files Browse the repository at this point in the history
docs: fix typo and improve consistency of comment for Error.Unwrap
  • Loading branch information
JaSei committed Jan 3, 2023
2 parents affbf8f + 2d06845 commit b30adbd
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit b30adbd

Please sign in to comment.