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

Commit cc5fbb7

Browse files
AlekSidavecheney
authored andcommitted
Documentation improvements (#69)
* Add install instructions. * Document that causer and stackTracer are stable.
1 parent a2d6902 commit cc5fbb7

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Package errors provides simple error handling primitives.
44

5+
`go get github.com/pkg/errors`
6+
57
The traditional error handling idiom in Go is roughly akin to
68
```go
79
if err != nil {

errors.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
// to reverse the operation of errors.Wrap to retrieve the original error
2929
// for inspection. Any error value which implements this interface
3030
//
31-
// type Causer interface {
31+
// type causer interface {
3232
// Cause() error
3333
// }
3434
//
@@ -43,6 +43,9 @@
4343
// // unknown error
4444
// }
4545
//
46+
// causer interface is not exported by this package, but is considered a part
47+
// of stable public API.
48+
//
4649
// Formatted printing of errors
4750
//
4851
// All error values returned from this package implement fmt.Formatter and can
@@ -77,6 +80,9 @@
7780
// }
7881
// }
7982
//
83+
// stackTracer interface is not exported by this package, but is considered a part
84+
// of stable public API.
85+
//
8086
// See the documentation for Frame.Format for more details.
8187
package errors
8288

@@ -191,7 +197,7 @@ func Wrapf(err error, format string, args ...interface{}) error {
191197
// An error value has a cause if it implements the following
192198
// interface:
193199
//
194-
// type Causer interface {
200+
// type causer interface {
195201
// Cause() error
196202
// }
197203
//

0 commit comments

Comments
 (0)