最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

成功安裝vscode中g(shù)o的相關(guān)插件(詳細(xì)教程)

 更新時(shí)間:2026年02月07日 15:35:32   作者:Leo_wlCnBlogs  
這篇文章主要介紹了成功安裝vscode中g(shù)o的相關(guān)插件的詳細(xì)教程,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下

讓你成功安裝vscode中g(shù)o的相關(guān)插件

注意:該演示環(huán)境是windows環(huán)境,linux和mac環(huán)境操作思路一樣

vscode中有很多go的相關(guān)插件,非常好用如下:

gocode
gopkgs
go-outline
go-symbols
guru
gorename
gomodifytags
goplay
impl
godef
goreturns
golint
gotests
dlv

但是由于各種原因,這些插件無(wú)法安裝,所以總結(jié)了如下方法,讓你還能將這些插件安裝成功,下圖是我直接通過vscode安裝提示的錯(cuò)誤:

貌似運(yùn)氣還不錯(cuò),還安裝成功了幾個(gè),但是大部分還是沒有安裝成功,下面是詳細(xì)的安裝日志:

Installing 14 tools at D:\go_project\bin
 gocode
 gopkgs
 go-outline
 go-symbols
 guru
 gorename
 gomodifytags
 goplay
 impl
 godef
 goreturns
 golint
 gotests
 dlv

Installing github.com/nsf/gocode SUCCEEDED
Installing github.com/uudashr/gopkgs/cmd/gopkgs SUCCEEDED
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/fatih/gomodifytags SUCCEEDED
Installing github.com/haya14busa/goplay/cmd/goplay SUCCEEDED
Installing github.com/josharian/impl FAILED
Installing github.com/rogpeppe/godef SUCCEEDED
Installing sourcegraph.com/sqs/goreturns FAILED
Installing github.com/golang/lint/golint FAILED
Installing github.com/cweill/gotests/... FAILED
Installing github.com/derekparker/delve/cmd/dlv SUCCEEDED

8 tools failed to install.

go-outline:
Error: Command failed: D:\Go\bin\go.exe get -u -v github.com/ramya-rao-a/go-outline
github.com/ramya-rao-a/go-outline (download)
Fetching https://golang.org/x/tools/go/buildutil?go-get=1
https fetch failed: Get https://golang.org/x/tools/go/buildutil?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/tools/go/buildutil: unrecognized import path "golang.org/x/tools/go/buildutil" (https fetch: Get https://golang.org/x/tools/go/buildutil?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
github.com/ramya-rao-a/go-outline (download)
Fetching https://golang.org/x/tools/go/buildutil?go-get=1
https fetch failed: Get https://golang.org/x/tools/go/buildutil?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/tools/go/buildutil: unrecognized import path "golang.org/x/tools/go/buildutil" (https fetch: Get https://golang.org/x/tools/go/buildutil?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

go-symbols:
Error: Command failed: D:\Go\bin\go.exe get -u -v github.com/acroca/go-symbols
github.com/acroca/go-symbols (download)
Fetching https://golang.org/x/tools/go/buildutil?go-get=1
https fetch failed: Get https://golang.org/x/tools/go/buildutil?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/tools/go/buildutil: unrecognized import path "golang.org/x/tools/go/buildutil" (https fetch: Get https://golang.org/x/tools/go/buildutil?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
github.com/acroca/go-symbols (download)
Fetching https://golang.org/x/tools/go/buildutil?go-get=1
https fetch failed: Get https://golang.org/x/tools/go/buildutil?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/tools/go/buildutil: unrecognized import path "golang.org/x/tools/go/buildutil" (https fetch: Get https://golang.org/x/tools/go/buildutil?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

guru:
Error: Command failed: D:\Go\bin\go.exe get -u -v golang.org/x/tools/cmd/guru
Fetching https://golang.org/x/tools/cmd/guru?go-get=1
https fetch failed: Get https://golang.org/x/tools/cmd/guru?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/tools/cmd/guru: unrecognized import path "golang.org/x/tools/cmd/guru" (https fetch: Get https://golang.org/x/tools/cmd/guru?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
Fetching https://golang.org/x/tools/cmd/guru?go-get=1
https fetch failed: Get https://golang.org/x/tools/cmd/guru?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/tools/cmd/guru: unrecognized import path "golang.org/x/tools/cmd/guru" (https fetch: Get https://golang.org/x/tools/cmd/guru?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

gorename:
Error: Command failed: D:\Go\bin\go.exe get -u -v golang.org/x/tools/cmd/gorename
Fetching https://golang.org/x/tools/cmd/gorename?go-get=1
https fetch failed: Get https://golang.org/x/tools/cmd/gorename?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/tools/cmd/gorename: unrecognized import path "golang.org/x/tools/cmd/gorename" (https fetch: Get https://golang.org/x/tools/cmd/gorename?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
Fetching https://golang.org/x/tools/cmd/gorename?go-get=1
https fetch failed: Get https://golang.org/x/tools/cmd/gorename?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/tools/cmd/gorename: unrecognized import path "golang.org/x/tools/cmd/gorename" (https fetch: Get https://golang.org/x/tools/cmd/gorename?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

impl:
Error: Command failed: D:\Go\bin\go.exe get -u -v github.com/josharian/impl
github.com/josharian/impl (download)
Fetching https://golang.org/x/tools/imports?go-get=1
https fetch failed: Get https://golang.org/x/tools/imports?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/tools/imports: unrecognized import path "golang.org/x/tools/imports" (https fetch: Get https://golang.org/x/tools/imports?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
github.com/josharian/impl (download)
Fetching https://golang.org/x/tools/imports?go-get=1
https fetch failed: Get https://golang.org/x/tools/imports?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/tools/imports: unrecognized import path "golang.org/x/tools/imports" (https fetch: Get https://golang.org/x/tools/imports?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

goreturns:
Error: Command failed: D:\Go\bin\go.exe get -u -v sourcegraph.com/sqs/goreturns
Fetching https://sourcegraph.com/sqs/goreturns?go-get=1
Parsing meta tags from https://sourcegraph.com/sqs/goreturns?go-get=1 (status code 200)
get "sourcegraph.com/sqs/goreturns": found meta tag get.metaImport{Prefix:"sourcegraph.com/sqs/goreturns", VCS:"git", RepoRoot:"https://github.com/sqs/goreturns"} at https://sourcegraph.com/sqs/goreturns?go-get=1
sourcegraph.com/sqs/goreturns (download)
github.com/sqs/goreturns (download)
Fetching https://golang.org/x/tools/imports?go-get=1
https fetch failed: Get https://golang.org/x/tools/imports?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/tools/imports: unrecognized import path "golang.org/x/tools/imports" (https fetch: Get https://golang.org/x/tools/imports?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
Fetching https://sourcegraph.com/sqs/goreturns?go-get=1
Parsing meta tags from https://sourcegraph.com/sqs/goreturns?go-get=1 (status code 200)
get "sourcegraph.com/sqs/goreturns": found meta tag get.metaImport{Prefix:"sourcegraph.com/sqs/goreturns", VCS:"git", RepoRoot:"https://github.com/sqs/goreturns"} at https://sourcegraph.com/sqs/goreturns?go-get=1
sourcegraph.com/sqs/goreturns (download)
github.com/sqs/goreturns (download)
Fetching https://golang.org/x/tools/imports?go-get=1
https fetch failed: Get https://golang.org/x/tools/imports?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/tools/imports: unrecognized import path "golang.org/x/tools/imports" (https fetch: Get https://golang.org/x/tools/imports?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

golint:
Error: Command failed: D:\Go\bin\go.exe get -u -v github.com/golang/lint/golint
github.com/golang/lint (download)
Fetching https://golang.org/x/tools/go/gcexportdata?go-get=1
https fetch failed: Get https://golang.org/x/tools/go/gcexportdata?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/tools/go/gcexportdata: unrecognized import path "golang.org/x/tools/go/gcexportdata" (https fetch: Get https://golang.org/x/tools/go/gcexportdata?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
github.com/golang/lint (download)
Fetching https://golang.org/x/tools/go/gcexportdata?go-get=1
https fetch failed: Get https://golang.org/x/tools/go/gcexportdata?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package golang.org/x/tools/go/gcexportdata: unrecognized import path "golang.org/x/tools/go/gcexportdata" (https fetch: Get https://golang.org/x/tools/go/gcexportdata?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

gotests:
Error: Command failed: D:\Go\bin\go.exe get -u -v github.com/cweill/gotests/...
github.com/cweill/gotests (download)
Fetching https://golang.org/x/tools/imports?go-get=1
https fetch failed: Get https://golang.org/x/tools/imports?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package github.com/cweill/gotests
 imports golang.org/x/tools/imports: unrecognized import path "golang.org/x/tools/imports" (https fetch: Get https://golang.org/x/tools/imports?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
github.com/cweill/gotests (download)
Fetching https://golang.org/x/tools/imports?go-get=1
https fetch failed: Get https://golang.org/x/tools/imports?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
package github.com/cweill/gotests
 imports golang.org/x/tools/imports: unrecognized import path "golang.org/x/tools/imports" (https fetch: Get https://golang.org/x/tools/imports?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

其實(shí)去src目錄下看的話,是下載成功了,但是沒有安裝成功,并且我們也可以看出有幾個(gè)是可以直接安裝成功的

github.com/nsf/gocode
github.com/tpng/gopkgs
github.com/fatih/gomodifytags
github.com/haya14busa/goplay
github.com/rogpeppe/gode
github.com/derekparker/delve/cmd/dlv

解決方法

關(guān)于go開發(fā)目錄的結(jié)構(gòu)這里不做過多解釋,之前已經(jīng)說過了

進(jìn)行如下命令進(jìn)行目錄切換:

cd %GOPATH%\src\github.com\golang

我這里的GOPATH是在D:\go_project
如果src目錄下面沒有g(shù)ithub.com\golang請(qǐng)自行創(chuàng)建

完成目錄切換后,開始下載插件包:

git clonehttps://github.com/golang/tools.gittools

當(dāng)下載完成后,你會(huì)發(fā)現(xiàn)%GOPATH%\src\github.com\golang多了一個(gè)tools目錄
需要把tools目錄下的所有文件拷貝到%GOPATH%\src\golang.org\x\tools下,如果沒有自行創(chuàng)建
當(dāng)然如果你是windows環(huán)境,如果你當(dāng)前是在%GOPATH%\src\golang.org\x\tools
目錄下,你可以直接使用如下命令進(jìn)行拷貝:
xcopy /s /e %GOPATH%\src\github.com\golang\tools
關(guān)于這個(gè)命令的使用可以具體百度查看,如果對(duì)該命令不熟悉就手動(dòng)拷貝,直接將你下載的tools目錄下的所有文件拷貝到%GOPATH%\src\golang.org\x\tools目錄下

經(jīng)過多次測(cè)試,插件中有幾個(gè)可以安裝成功:

github.com/nsf/gocode
github.com/uudashr/gopkgs/cmd/gopkgs
github.com/fatih/gomodifytags
github.com/haya14busa/goplay/cmd/goplay
github.com/derekparker/delve/cmd/dlv

下面安裝無(wú)法安裝的插件
開始安裝:
切換到GOPATH目錄下,執(zhí)行相關(guān)的go install 命令

go install github.com/ramya-rao-a/go-outline

go install github.com/acroca/go-symbols

go install golang.org/x/tools/cmd/guru

go install golang.org/x/tools/cmd/gorename

go install github.com/josharian/impl

go install github.com/rogpeppe/godef

go install github.com/sqs/goreturns

go install github.com/golang/lint/golint

go install github.com/cweill/gotests/gotests

這樣vscode下go開發(fā)需要安裝的插件都已經(jīng)安裝成功

總結(jié)

到此這篇關(guān)于成功安裝vscode中g(shù)o的相關(guān)插件的詳細(xì)教程的文章就介紹到這了,更多相關(guān)vscode安裝go插件內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • go實(shí)現(xiàn)for range迭代時(shí)修改值的操作

    go實(shí)現(xiàn)for range迭代時(shí)修改值的操作

    這篇文章主要介紹了go實(shí)現(xiàn)for range迭代時(shí)修改值的操作,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧
    2021-04-04
  • 如何使用proto組件編譯pb.go文件

    如何使用proto組件編譯pb.go文件

    這篇文章主要介紹了如何使用proto組件編譯pb.go文件的詳細(xì)過程詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2023-10-10
  • Golang flag包的具體使用

    Golang flag包的具體使用

    本文主要介紹了Golang flag包的具體使用,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2023-02-02
  • Go語(yǔ)言實(shí)現(xiàn)簡(jiǎn)單Web服務(wù)器的方法

    Go語(yǔ)言實(shí)現(xiàn)簡(jiǎn)單Web服務(wù)器的方法

    這篇文章主要介紹了Go語(yǔ)言實(shí)現(xiàn)簡(jiǎn)單Web服務(wù)器的方法,實(shí)例分析了Web服務(wù)器的實(shí)現(xiàn)原理與相關(guān)技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下
    2015-02-02
  • Go語(yǔ)言sync.Cond使用方法詳解

    Go語(yǔ)言sync.Cond使用方法詳解

    Go語(yǔ)言標(biāo)準(zhǔn)庫(kù)中還包含條件變量 sync.Cond,它可以讓一組 Goroutine 都在滿足特定條件時(shí)被喚醒,每一個(gè)sync.Cond結(jié)構(gòu)體在初始化時(shí)都需要傳入一個(gè)互斥鎖,接下來我們將通過文中例子了解它的使用方法,感興趣的同學(xué)跟著小編一起來看看吧
    2023-07-07
  • Golang中實(shí)現(xiàn)類似類與繼承的方法(示例代碼)

    Golang中實(shí)現(xiàn)類似類與繼承的方法(示例代碼)

    這篇文章主要介紹了Golang中實(shí)現(xiàn)類似類與繼承的方法,Go語(yǔ)言中通過方法接受者的類型來決定方法的歸屬和繼承關(guān)系,本文通過示例代碼講解的非常詳細(xì),需要的朋友可以參考下
    2024-04-04
  • 深入剖析Go語(yǔ)言中的Select語(yǔ)句

    深入剖析Go語(yǔ)言中的Select語(yǔ)句

    select是Go中的一個(gè)控制結(jié)構(gòu),類似于switch語(yǔ)句,本文主要介紹了深入剖析Go語(yǔ)言中的Select語(yǔ)句,具有一定的參考價(jià)值,感興趣的可以了解一下
    2023-12-12
  • 深入理解Go之==的使用

    深入理解Go之==的使用

    本文主要介紹了深入理解Go之==的使用,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2025-11-11
  • Go語(yǔ)言通過Luhn算法驗(yàn)證信用卡卡號(hào)是否有效的方法

    Go語(yǔ)言通過Luhn算法驗(yàn)證信用卡卡號(hào)是否有效的方法

    這篇文章主要介紹了Go語(yǔ)言通過Luhn算法驗(yàn)證信用卡卡號(hào)是否有效的方法,實(shí)例分析了Luhn算法的原理與驗(yàn)證卡號(hào)的使用技巧,需要的朋友可以參考下
    2015-03-03
  • 詳解GO語(yǔ)言中[]byte與string的兩種轉(zhuǎn)換方式和底層實(shí)現(xiàn)

    詳解GO語(yǔ)言中[]byte與string的兩種轉(zhuǎn)換方式和底層實(shí)現(xiàn)

    這篇文章主要為大家詳細(xì)介紹了GO語(yǔ)言中[]byte與string的兩種轉(zhuǎn)換方式和底層實(shí)現(xiàn)的相關(guān)知識(shí),文中的示例代碼講解詳細(xì),有需要的小伙伴可以參考下
    2024-03-03

最新評(píng)論

平度市| 竹溪县| 安化县| 宜章县| 克山县| 阳春市| 民勤县| 宜昌市| 萨嘎县| 托克托县| 称多县| 雅安市| 平山县| 顺昌县| 荥经县| 南华县| 天气| 伊金霍洛旗| 福安市| 平阳县| 西峡县| 景泰县| 博野县| 凤城市| 紫阳县| 思南县| 日照市| 通辽市| 铁岭县| 右玉县| 修文县| 海安县| 新营市| 修水县| 黄陵县| 邵阳市| 平乡县| 宽甸| 祁东县| 布尔津县| 镇坪县|