問題詳情:
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文件夾下所有文件,重新執行命令,問題解決。
~
