Commit d9a3d902 authored by Jonathan Amsterdam's avatar Jonathan Amsterdam
Browse files

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: default avatarKatie Hockman <katie@golang.org>
parent 6fcc2d85
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment