go version go1.6.1 linux/amd6
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/rot256/go"
GORACE=""
GOROOT="/usr/lib/go"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
The distro is Debian (unstable)
See this program for a POC
I expected the last line to not be printed,
since "Junk" returns nil (and the program typechecks)
I expected err != nil to be false.
I don't know if this is intended behavior, but it seems error prone.
Most helpful comment
See Why is my nil error value not equal to nil?