Statement, I am also a variety of information to make this, found that the error will be updated in time this article
First of all, about the wall, please bring your own ladder or something ...
Second, here's a description of why the ladder has no way to proxy cmd
Finally, we start to configure the environment
Vscode expansion plug-in installation
- Extended Store Search
Go
General installation The first one is right, the extension is calledGo
- Configure the Go configuration file
- Files-Preferences-settings-user settings, copying the following to user settings, or individually configurable in workspace settings
gopath
// golang配置 "go.formatTool": "goreturns", "go.goroot": "D:/Go", "go.gopath": "${workspaceRoot}"
- After the configuration is complete Vscode should be prompted to install the plugin, click Install all on the line
- Normally there will be a lot of installation failures, when we need to manually go to GitHub to download
Manually go to GitHub to download tools
First, close the Vscode
Second, get your git ready and switch to%GOPATH%\src\github.com\golang\
Finally, the relevant reference articles are as follows:
Let you successfully install the relevant plugins for go in Vscode
Git error Collection
git clone https://github.com/golang/tools.git tools
- Copy
tools
directory to%GOPATH%\src\golang.org\x\
# git bash 中的操作,需提前建立目录cp -r tools/ ../../golang.org/x/
- Copy
%GOPATH%\src\github.com\golang\
the lint
folder under the %GOPATH%\src\golang.org\x\
directory
Do not copy will be in the installation of the report can not find errors, as follows:
= = Do not know why this error is reported, anyway, copy the past to solve
E:\GoProjects\go_study>go install github.com\golang\lint\golintsrc\github.com\golang\lint\golint\golint.go:19:2: cannot find package "golang.org/x/lint" in any of: D:\Go\src\golang.org\x\lint (from $GOROOT) E:\GoProjects\go_study\src\golang.org\x\lint (from $GOPATH)# 复制过去之后手动执行这个命令安装就行E:\GoProjects\go_study>go install github.com\golang\lint\golint
- Re-open your Vscode, you will also be prompted to install a plug-in not installed successfully, this time still click Install all plug-ins, and then wait for the installation to complete ...
Not finished ... Find errors and issues that will update this article in a timely manner