Installing github.com/nsf/gocode FAILED 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 FAILED ...解决过程
官方Go模块代理说明链接点此处跳转Github
其中在Windows下
打开cmd,依次输入下面语句:
go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.cn,direct
在macOS或Linux下
打开终端,依次输入下面语句:
export GO111MODULE=on export GOPROXY=https://goproxy.cn
或
echo "export GO111MODULE=on" >> ~/.profile echo "export GOPROXY=https://goproxy.cn" >> ~/.profile source ~/.profile回到VS code,成功安装所有扩展
Tools environment: GOPATH=C:Usersmacgo Installing 10 tools at C:Usersmacgobin in module mode. gopkgs go-outline gotests gomodifytags impl goplay dlv dlv-dap staticcheck gopls Installing github.com/uudashr/gopkgs/v2/cmd/gopkgs (C:Usersmacgobingopkgs.exe) SUCCEEDED Installing github.com/ramya-rao-a/go-outline (C:Usersmacgobingo-outline.exe) SUCCEEDED Installing github.com/cweill/gotests/gotests (C:Usersmacgobingotests.exe) SUCCEEDED Installing github.com/fatih/gomodifytags (C:Usersmacgobingomodifytags.exe) SUCCEEDED Installing github.com/josharian/impl (C:Usersmacgobinimpl.exe) SUCCEEDED Installing github.com/haya14busa/goplay/cmd/goplay (C:Usersmacgobingoplay.exe) SUCCEEDED Installing github.com/go-delve/delve/cmd/dlv (C:Usersmacgobindlv.exe) SUCCEEDED Installing github.com/go-delve/delve/cmd/dlv@master (C:Usersmacgobindlv-dap.exe) SUCCEEDED Installing honnef.co/go/tools/cmd/staticcheck (C:Usersmacgobinstaticcheck.exe) SUCCEEDED Installing golang.org/x/tools/gopls (C:Usersmacgobingopls.exe) SUCCEEDED All tools successfully installed. You are ready to Go :).
欢迎一键三连~~



