为什么GOPATH在Go Env中变成了“ OPATH”

localhost:~ jjw$ cat .bash_profile
export GOPATH="/Users/jjw/gocode"
localhost:~ jjw$
localhost:~ jjw$ source .bash_profile
localhost:~ jjw$ go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
"OPATH="/Users/jjw/gocode 
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"

I am confused as to why GOPATH turned to "OPATH.

I suppose your export GOPATH line terminates by (a la Windows) instead of just (a la Unix).

The is the carriage return character. It just resets the column number. So that's why the " character is displayed on top of the G character.

You can check this point by using the od or hexdump command on your .bash_profile file.