vscode工具,golang-dlv 调试,爆出:
GOPATH set to GOROOT (/usr/local/go) has no effect
解决方案:环境配置PATH,需要包含GOPATH和GOROOT/bin
工具箱默认放在GOPATH目录下。
export GOROOT=/usr/local/go
export GOPATH=/root/test
export PATH=$PATH:$GOROOT/bin:$GOPATH
执行命令:
#source ~/.bashrc
其中,GOPATH是项目工程:
/root/test/tencent/cloundPSS