We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go version
go version go1.11.1 linux/amd64
yes
go env
GOARCH="amd64" GOBIN="" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/go" GOPROXY="" GORACE="" GOROOT="/usr/local/go" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="0" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config"
https://play.golang.org/p/bwmjw0Rt_wk
n2 == nil should be true (reflect.ValueOf(n2).IsNil() reports true correctly)
n2 == nil
reflect.ValueOf(n2).IsNil()
n2 == nil is false
The text was updated successfully, but these errors were encountered:
Intended behavior. An interface consists of two "fields", a type, and a pointer to the value.
In order for an interface to == nil, both the type and value need to be nil.
== nil
https://golang.org/doc/faq#nil_error
Sorry, something went wrong.
Ahh, thanks for clearing things up.
No branches or pull requests
What version of Go are you using (
go version
)?go version go1.11.1 linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?What did you do?
https://play.golang.org/p/bwmjw0Rt_wk
What did you expect to see?
n2 == nil
should be true (reflect.ValueOf(n2).IsNil()
reports true correctly)What did you see instead?
n2 == nil
is falseThe text was updated successfully, but these errors were encountered: