Tag Archives: VS Code Install Go Plug-in Error

How to Solve VS Code Install Go Plug-in Error

Environmental description

Win10

Go 1.17.3

VS Code 1.62.2

Problem phenomenon

When developing the Go program with vscode, you will be prompted that the go plug-in is not installed, and click Install all

A bunch of installation failures will be reported

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.

Solution:

use https://goproxy.io agent

Set the go environment variable in the CMD window

go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.io,direct

Close, reopen vscode, and click Install all to complete the installation