Skip to content

Commit b30adbd

Browse files
authored
Merge pull request avast#82 from JamieEdge/fix-error-unwrap-godoc
docs: fix typo and improve consistency of comment for Error.Unwrap
2 parents affbf8f + 2d06845 commit b30adbd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

retry.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ func (e Error) As(target interface{}) bool {
228228
}
229229

230230
/*
231-
Unwrap the last error for compatible with the `errors.Unwrap()`
232-
when you need unwrap all erros, you should use `WrappedErrors()` instead
231+
Unwrap the last error for compatibility with `errors.Unwrap()`.
232+
When you need to unwrap all errors, you should use `WrappedErrors()` instead.
233233
234234
err := Do(
235235
func() error {
@@ -240,7 +240,7 @@ when you need unwrap all erros, you should use `WrappedErrors()` instead
240240
241241
fmt.Println(errors.Unwrap(err)) # "original error" is printed
242242
243-
added in version 4.2.0
243+
Added in version 4.2.0.
244244
*/
245245
func (e Error) Unwrap() error {
246246
return e[len(e)-1]

0 commit comments

Comments
 (0)