Home  >  Article  >  Development Tools  >  VSCode Go extension installation failed

VSCode Go extension installation failed

Guanhui
GuanhuiOriginal
2020-05-30 17:21:175038browse

VSCode Go extension installation failed

VSCode Go extension installation failed

VSCode Go extension installation failed. The reason is that the installation of plug-ins needs to rely on foreign websites "https://golang .org/x/tools", which is inaccessible in China, so the installation fails. The solution is to use the official image library established by Go on Github and download the plug-in to the local installation.

Clone method

// 进入VS Code设置的GOPATH的src目录
 
cd /D D:\GoProjects\src
 
// 创建golang.org目录,如果已经存在忽略该指令
 
mkdir golang.org
 
// 进入golang.org目录
 
cd golang.org
 
// 创建x目录,如果已经存在忽略该指令
 
mkdir x
 
// 进入x目录
 
cd x
 
// 获取tools源码
 
git clone https://github.com/golang/tools
 
// 获取lint源码
 
git clone https://github.com/golang/lint

Installation plug-in

Installing github.com/mdempsky/gocode SUCCEEDED

Installing github.com/ramya-rao-a/go-outline SUCCEEDED

Installing github.com/acroca/go-symbols SUCCEEDED

Installing golang.org/x/tools/cmd/guru SUCCEEDED

Installing golang.org/x/tools/cmd/gorename SUCCEEDED

Installing github.com/stamblerre/gocode SUCCEEDED

Installing github.com/sqs/goreturns SUCCEEDED

Installing golang.org/x/lint/golint SUCCEEDED

 

All tools successfully installed. You're ready to Go :).

Recommended tutorial: "Go Tutorial

The above is the detailed content of VSCode Go extension installation failed. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn