Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors: documentation for errors.Unwrap mentions non existing interface Wrapper #32130

Closed
johan-bolmsjo opened this issue May 18, 2019 · 2 comments
Closed

Comments

@johan-bolmsjo
Copy link

@johan-bolmsjo johan-bolmsjo commented May 18, 2019

What version of Go are you using (go version)?

$ go version
go version devel +1ab063ce53 Fri May 17 22:32:30 2019 +0000 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/johan/.cache/go-build"
GOENV="/home/johan/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/johan/go"
GOPROXY="direct"
GOROOT="/home/johan/go/go"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/home/johan/go/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/johan/go/go/src/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build709384782=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Check documentation for errors package in standard library.

What did you expect to see?

Correct documentation for errors.Unwrap, similar to the Is and As functions.

What did you see instead?

The documentation for the Unwrap function mentions a non existing interface called Wrapper. This interface has was removed by revert in commit 3e2c522

Also it's rather unclear how one would go about actually wrap an error. There is the Unwrap function with a short comment (that mentions the non existing Wrapper interface), but nothing much else that provide more context. How are errors chained? Up to 3pp library support?

@ALTree
Copy link
Member

@ALTree ALTree commented May 18, 2019

Thanks for reporting this.

This issue has already been noticed, and it'll be fixed by CL 177617.

@ALTree ALTree changed the title Documentation for errors.Unwrap mentions non existing interface Wrapper errors: documentation for errors.Unwrap mentions non existing interface Wrapper May 18, 2019
@ALTree ALTree added the NeedsFix label May 18, 2019
@ALTree ALTree added this to the Go1.13 milestone May 18, 2019
@neild
Copy link
Contributor

@neild neild commented May 22, 2019

@neild neild closed this May 22, 2019
@golang golang locked and limited conversation to collaborators May 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.