From 4b4164a283544e9764c85b484d566e8bf4578fc3 Mon Sep 17 00:00:00 2001 From: Alexey Palazhchenko Date: Mon, 11 Jul 2016 11:26:22 +0300 Subject: [PATCH 1/2] Add install instructions. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6ea6422e..273db3c9 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Package errors provides simple error handling primitives. +`go get github.com/pkg/errors` + The traditional error handling idiom in Go is roughly akin to ```go if err != nil { From c1626d89411231bea2d90643c7f8a5bd0846c0f5 Mon Sep 17 00:00:00 2001 From: Alexey Palazhchenko Date: Mon, 11 Jul 2016 11:33:49 +0300 Subject: [PATCH 2/2] Document that causer and stackTracer are stable. --- errors.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/errors.go b/errors.go index 6c45c8dc..71f14315 100644 --- a/errors.go +++ b/errors.go @@ -28,7 +28,7 @@ // to reverse the operation of errors.Wrap to retrieve the original error // for inspection. Any error value which implements this interface // -// type Causer interface { +// type causer interface { // Cause() error // } // @@ -43,6 +43,9 @@ // // unknown error // } // +// causer interface is not exported by this package, but is considered a part +// of stable public API. +// // Formatted printing of errors // // All error values returned from this package implement fmt.Formatter and can @@ -77,6 +80,9 @@ // } // } // +// stackTracer interface is not exported by this package, but is considered a part +// of stable public API. +// // See the documentation for Frame.Format for more details. package errors @@ -191,7 +197,7 @@ func Wrapf(err error, format string, args ...interface{}) error { // An error value has a cause if it implements the following // interface: // -// type Causer interface { +// type causer interface { // Cause() error // } //