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 go version go1.20.4 darwin/amd64
Yes
go env
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/Users/jeff/Library/Caches/go-build" GOENV="/Users/jeff/Library/Application Support/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/jeff/.gvm/pkgsets/go1.20.4/global/pkg/mod" GONOPROXY="github.com/TykTechnologies" GONOSUMDB="github.com/TykTechnologies" GOOS="darwin" GOPATH="/Users/jeff/.gvm/pkgsets/go1.20.4/global" GOPRIVATE="github.com/TykTechnologies" GOPROXY="https://proxy.golang.org,direct" GOROOT="/Users/jeff/.gvm/gos/go1.20.4" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/Users/jeff/.gvm/gos/go1.20.4/pkg/tool/darwin_amd64" GOVCS="" GOVERSION="go1.20.4" GCCGO="gccgo" GOAMD64="v1" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/dev/null" GOWORK="" CGO_CFLAGS="-O2 -g" CGO_CPPFLAGS="" CGO_CXXFLAGS="-O2 -g" CGO_FFLAGS="-O2 -g" CGO_LDFLAGS="-O2 -g" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/hr/85yzfms503jcqnbtq95rjpkw0000gn/T/go-build1709030999=/tmp/go-build -gno-record-gcc-switches -fno-common"
I'm trying to compare two net.IPs which are nil. https://go.dev/play/p/fmHC7Q9KMBY
net.IP
The comparison IP.Equals should return false
IP.Equals returns true when both values are nil
The text was updated successfully, but these errors were encountered:
But nil is equal to nil. I'm not sure why you think otherwise.
Sorry, something went wrong.
No branches or pull requests
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I'm trying to compare two
net.IP
s which are nil.https://go.dev/play/p/fmHC7Q9KMBY
What did you expect to see?
The comparison IP.Equals should return false
What did you see instead?
IP.Equals returns true when both values are nil
The text was updated successfully, but these errors were encountered: