執行go env是總是出現.bash_profile配置的和env顯示的不同原因是.bash_profile檔案和.zshrc都要增加配置
vim ~/.bash_profile
# Setting PATH for Python 3.5
# The orginal version is saved in .bash_profile.pysave
#PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}"
#export PATH
export GOPATH=$HOME/go
GOROOT=/usr/local/go
export GOROOT
#GOROOT bin
export PATH=$PATH:$GOROOT/bin
#GOPATH bin
export PATH=$PATH:$GOPATH/bin
export PATH="/usr/local/opt/openssl/bin:$PATH"
vim ~/.zshrc
#export PATH
export GOPATH=$HOME/go
GOROOT=/usr/local/go
export GOROOT
#GOROOT bin
export PATH=$PATH:$GOROOT/bin
#GOPATH bin
export PATH=$PATH:$GOPATH/bin
export PATH="/usr/local/opt/openssl/bin:$PATH"
本作品採用《CC 協議》,轉載必須註明作者和本文連結