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