问题详情:
go环境安装好后,运行go代码也没有问题
下载govendor包的时候提示:
cannot download, /home/azhukov/go is a GOROOT, not a GOPATH
解决方法:
This error is caused by the go
tool detecting a Go installation in your GOPATH. It's not telling you that your GOPATH is the GOROOT (that's a different message), it's telling your GOPATH looks like aGOROOT.
Cleaning out your GOPATH and running go get
again will fix the error.
查看GOROOT和GOPATH配置均没有问题,后发现GOPATH文件夹下目录结构和GOROOT一样,不知道何时go在GOPATH下也安装了。
删除GOPATH文件夹下所有文件,重新执行命令,问题解决。
~