Skip to content
This repository was archived by the owner on Dec 1, 2021. It is now read-only.

Commit cd6e0b4

Browse files
committed
address spelling mistakes. Thanks @seh
1 parent 6526c1c commit cd6e0b4

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ if err != nil {
1919
return errors.Wrap(err, "read failed")
2020
}
2121
```
22-
In addition, errors.Wrap records the file and line where it was called, allowing the programmer to retrieve the path to the original error.
22+
In addition, `errors.Wrap` records the file and line where it was called, allowing the programmer to retrieve the path to the original error.
2323

2424
## Retrieving the cause of an error
2525

26-
Using errors.Wrap constructs a stack of errors, adding context to the preceding error. Depending on the nature of the error it may be necessary to recurse the operation of errors.Wrap to retrieve the original error for inspection. Any error value which implements this interface
26+
Using `errors.Wrap` constructs a stack of errors, adding context to the preceding error. Depending on the nature of the error it may be necessary to recurse the operation of errors.Wrap to retrieve the original error for inspection. Any error value which implements this interface can be inspected by `errors.Cause`.
2727
```
2828
type causer interface {
2929
Cause() error
3030
}
3131
```
32-
Can be inspected by errors.Cause which will recursively retrieve the topmost error which does nor implement causer, which is assumed to be the original cause. For example:
32+
`errors.Cause` will recursively retrieve the topmost error which does nor implement causer, which is assumed to be the original cause. For example:
3333
```
3434
switch err := errors.Cause(err).(type) {
3535
case *MyError:

errors.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@
2828
//
2929
// Using errors.Wrap constructs a stack of errors, adding context to the
3030
// preceding error. Depending on the nature of the error it may be necessary
31-
// to recerse the operation of errors.Wrap to retrieve the original error
31+
// to reverse the operation of errors.Wrap to retrieve the original error
3232
// for inspection. Any error value which implements this interface
3333
//
3434
// type causer interface {
3535
// Cause() error
3636
// }
3737
//
38-
// Can be inspected by errors.Cause which will recursively retrieve the topmost
39-
// error which does nor implement causer, which is assumed to be the original
40-
// cause. For example:
38+
// can be inspected by errors.Cause. errors.Cause will recursively retrieve
39+
// the topmost error which does nor implement causer, which is assumed to be
40+
// the original cause. For example:
4141
//
4242
// switch err := errors.Cause(err).(type) {
4343
// case *MyError:

0 commit comments

Comments
 (0)