您好,登錄后才能下訂單哦!
這篇文章主要講解了“vscode安裝go插件失敗如何解決”,文中的講解內容簡單清晰,易于學習與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學習“vscode安裝go插件失敗如何解決”吧!
下載go1.14.6.windows-amd64.msi
安裝即可,安裝路徑選擇默認,安裝完成后會自動幫你配置環境變量
不用自己配置了
打開cmd,查看是否安裝完成
這樣就代表已經成功安裝了
vscode會提示你安裝go插件
點擊install all
這時候會安裝失敗
Installing github.com/mdempsky/gocode FAILED
Installing github.com/uudashr/gopkgs/v2/cmd/gopkgs FAILED
Installing github.com/ramya-rao-a/go-outline FAILED
Installing github.com/acroca/go-symbols FAILED
Installing golang.org/x/tools/cmd/guru FAILED
Installing golang.org/x/tools/cmd/gorename FAILED
Installing github.com/cweill/gotests/… FAILED
Installing github.com/fatih/gomodifytags FAILED
Installing github.com/josharian/impl FAILED
Installing github.com/davidrjenni/reftools/cmd/fillstruct FAILED
Installing github.com/haya14busa/goplay/cmd/goplay FAILED
Installing github.com/godoctor/godoctor FAILED
Installing github.com/go-delve/delve/cmd/dlv FAILED
Installing github.com/stamblerre/gocode FAILED
Installing github.com/rogpeppe/godef FAILED
Installing github.com/sqs/goreturns FAILED
Installing golang.org/x/lint/golint FAILED
原因你懂的
https://goproxy.io是一個國內的代理
執行
# 舊版,已廢棄 go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.io,direct
# 新版改成如下鏈接 go env -w GO111MODULE=on go env -w GOPROXY=https://proxy.golang.com.cn,direct
關閉vscode重新打開,再次點擊install all
成功安裝
開啟go mod 代理后也可以手動安裝
go get -u -v github.com/mdempsky/gocode go get -u -v github.com/uudashr/gopkgs/v2/cmd/gopkgs go get -u -v github.com/ramya-rao-a/go-outline go get -u -v github.com/acroca/go-symbols go get -u -v golang.org/x/tools/cmd/guru go get -u -v golang.org/x/tools/cmd/gorename go get -u -v github.com/cweill/gotests/... go get -u -v github.com/fatih/gomodifytags go get -u -v github.com/josharian/impl go get -u -v github.com/davidrjenni/reftools/cmd/fillstruct go get -u -v github.com/haya14busa/goplay/cmd/goplay go get -u -v github.com/godoctor/godoctor go get -u -v github.com/go-delve/delve/cmd/dlv go get -u -v github.com/stamblerre/gocode go get -u -v github.com/rogpeppe/godef go get -u -v github.com/sqs/goreturns go get -u -v golang.org/x/lint/golint
如圖
感謝各位的閱讀,以上就是“vscode安裝go插件失敗如何解決”的內容了,經過本文的學習后,相信大家對vscode安裝go插件失敗如何解決這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是億速云,小編將為大家推送更多相關知識點的文章,歡迎關注!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。