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

Commit 01fa410

Browse files
djuidavecheney
authored andcommitted
Align code example documentation (#52)
1 parent 73d71e4 commit 01fa410

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

errors.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
//
33
// The traditional error handling idiom in Go is roughly akin to
44
//
5-
// if err != nil {
6-
// return err
7-
// }
5+
// if err != nil {
6+
// return err
7+
// }
88
//
99
// which applied recursively up the call stack results in error reports
1010
// without context or debugging information. The errors package allows
@@ -16,10 +16,10 @@
1616
// The errors.Wrap function returns a new error that adds context to the
1717
// original error. For example
1818
//
19-
// _, err := ioutil.ReadAll(r)
20-
// if err != nil {
21-
// return errors.Wrap(err, "read failed")
22-
// }
19+
// _, err := ioutil.ReadAll(r)
20+
// if err != nil {
21+
// return errors.Wrap(err, "read failed")
22+
// }
2323
//
2424
// Retrieving the cause of an error
2525
//

0 commit comments

Comments
 (0)