]> Cypherpunks repositories - gostls13.git/commit
errors: fix wrong code in package doc
authorJonathan Amsterdam <jba@google.com>
Wed, 4 Sep 2019 17:01:16 +0000 (13:01 -0400)
committerJonathan Amsterdam <jba@google.com>
Wed, 4 Sep 2019 17:08:55 +0000 (17:08 +0000)
commitd9a3d902ec139c95d8dc1b69977783fb8134b552
treeb3c37e549abcb85f76e4eb18a5f4456ddbfc41e9
parent6fcc2d85be557c6890a1ad50ee280fa3cd8088e6
errors: fix wrong code in package doc

You can't call Unwrap on the return value of fmt.Errorf, but
you can pass the result to errors.Unwrap.

Also, move the description of the Unwrap function up so the
example makes sense.

Fixes #34061.

Change-Id: Ica07c44665c5e65deea4aa6a146fc543a5a0a99d
Reviewed-on: https://go-review.googlesource.com/c/go/+/193298
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Katie Hockman <katie@golang.org>
src/errors/errors.go