I want to change my diretory to go/pkg/darwin_amd64
but $ cd $GOPATH/pkg/${GOOS}_${GOARCH}
doesn't find the folder though directory exists.
$ echo $GOPATH/pkg/${GOOS}_${GOARCH}
gives /go/pkg/_
instead of /go/pkg/darwin_amd64
.
$ go env
prints:
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/sahilkapoor/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
We can see that GOOS
and GOARCH
are defined here. I am using terminal on Mac OSX 10.10.3. What am I missing?