"Go foundation" Section 4 VS Code Configuration Go language development environment

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 installinstall.

After installation the lower right corner will be prompted to 重启VS Coderestart 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 Toolsthe 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).

  1. In his first GOPATHof srccreate directory golang.org/xdirectory
  2. Open in the directory 终端/cmd
  3. Execute git clone https://github.com/golang/tools.git toolsthe command
  4. Execute git clone https://github.com/golang/lint.gitthe command
  5. 在VS Code按下 Ctrl / Command+Shift+p 再次执行 go:install/Update Tools 命令, 在弹出的窗口中全选并点击确定, 这次安装就可以全部安装成功了.

经过上面的步骤就可以安装成功了.

Guess you like

Origin www.cnblogs.com/BlameKidd/p/11620175.html