【发布时间】:2019-06-05 01:06:27
【问题描述】:
我正在学习 Go,但遇到了一些问题。
我关注
go install
但是一个错误:
no install location for directory /Users/skan/documents/study/golang/src/section1 outside GOPATH
For more details see: ’go help gopath’
所以我回到我的 .bash/profile
这是我的 .bash/profile
# added by Anaconda3 2018.12 installer
# >>> conda init >>>
# !! Contents within this block are managed by ’conda init’ !!
__conda_setup=”$(CONDA_REPORT_ERRORS=false ’/anaconda3/bin/conda’ shell.bash hook 2> /dev/null)”
if [ $? -eq 0 ]; then
\eval ”$__conda_setup”
else
if [ -f ”/anaconda3/etc/profile.d/conda.sh” ]; then
. ”/anaconda3/etc/profile.d/conda.sh”
CONDA_CHANGEPS1=false conda activate base
else
\export PATH=”/anaconda3/bin:$PATH:$GOPATH:$GOBIN”
fi
fi
unset __conda_setup
# <<< conda init <<<
export GOPATH="/Users/skan/Documetns/study/golang"
export GOBIN=$GOPATH/bin
【问题讨论】:
-
那么当你按照指示运行
go help gopath时,你学到了什么? -
仅限错字。经验法则:如果有问题:至少检查 3 次拼写错误。