VS Code is a Microsoft open source editor, this paper describes how to use VS Code Go build language development environment.
Download and install the VS Code
Official Download: https://code.visualstudio.com/Download
Double-click the downloaded installation file, the installation can
Simplified Chinese is installed plug-ins
Click on the left menu bar last item 管理扩展
in 搜索框
the input chinese
, select the result list of the first item, click install
install.
After installation the lower right corner will be prompted to 重启VS Code
restart after VS Code to display Chinese.
Go to install the development environment
Click on the left menu bar last item 管理扩展
in 搜索框
the input go
, select the result list of the first item, click 安装
to install.
Installation Go Language Development Kit
Go during the time of language development, installation following these plug-ins can provide, such as code hints for us, code completion feature congruent.
Press the Windows platform Ctrl+Shift+p
, under the Mac platform by Command+Shift++p
, VS Code interface will pop up an input box, type in the input box go:install
, select Go:install/Update Tools
the following figure:
Click to select 确定
, install it.
As the domestic network environment basically failed to install will appear, as shown below:
Solution:
manually download the tool from github (premise need git is already installed on your computer).
- In his first
GOPATH
ofsrc
create directorygolang.org/x
directory- Open in the directory
终端
/cmd
- Execute
git clone https://github.com/golang/tools.git tools
the command- Execute
git clone https://github.com/golang/lint.git
the command- 在VS Code按下
Ctrl / Command+Shift+p
再次执行go:install/Update Tools
命令, 在弹出的窗口中全选并点击确定, 这次安装就可以全部安装成功了.
经过上面的步骤就可以安装成功了.