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

cmd/go: Confused about error comparison #27815

Closed
tr3ee opened this issue Sep 22, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@tr3ee
Copy link

commented Sep 22, 2018

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

go version go1.9.2 windows/amd64

Does this issue reproduce with the latest release?

yes

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

set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GORACE=
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config

What did you do?

https://play.golang.org/p/cmkSo7H8qSo

What did you expect to see?

NIL

What did you see instead?

NOT NIL

Is this a bug?

@tr3ee tr3ee changed the title cmd/go: Confusion about error comparison cmd/go: Confused about error comparison Sep 22, 2018

@tevjef

This comment has been minimized.

Copy link

commented Sep 22, 2018

Please see https://golang.org/doc/faq#nil_error for why it is not nil. Also, the issue tracker is for issues and features only.

Please use one of the forums (https://golang.org/help/) for asking for help.

@tr3ee

This comment has been minimized.

Copy link
Author

commented Sep 22, 2018

Please see https://golang.org/doc/faq#nil_error for why it is not nil. Also, the issue tracker is for issues and features only.

Please use one of the forums (https://golang.org/help/) for asking for help.

thanks for help.

@tr3ee tr3ee closed this Sep 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.