Home > php教程 > php手册 > Install the go language plug-in in Visual Studio Code

Install the go language plug-in in Visual Studio Code

坏嘻嘻
Release: 2018-09-14 11:38:24
Original
5038 people have browsed it

PHP entry-level statements, including if statements, while statements, and go statements, are for reference by PHP beginners.

During the process of installing the go language plug-in in vscode, the prompt tool was incomplete. Then I clicked the install all button but an error occurred. I found some methods through search, but it still didn't work. There are two main problems. First, golang.org is blocked outside the wall. Even after borrowing a ladder, it still cannot be successfully installed. The analysis shows that there is a redirection when requesting golang.org to obtain the tool code. The go command does not detect this. A change caused the installation of tools including those written by Microsoft girls to fail due to dependencies.

The solution is to follow the example and redirect to the github site by requesting the URL of the installation failure prompt. According to the imported package path in the go source code, create the corresponding directory in the user directory, and then clone the entire warehouse. Go to the local area and install it successfully.

The last prompt information displayed is as follows. If you are sincere, you will find a golden stone:

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

Execute the following command in GOPATH:

mkdir src\golang.org\x
Copy after login

Then clone the two warehouses to Under the x directory:

git clone https://github.com/golang/lint.git
git clone https://github.com/golang/tools.git
Copy after login

Open vscode, edit or save a .go file to trigger the plug-in's prompt for missing tools, and then the automatic installation will be successful.

You can also obtain the remote code installation according to the go command used during the plug-in installation process, or enter the local code directory to directly install the locally cloned code. However, it is not as convenient as the automatic plug-in installation. It can be used if you are blocked. Step by step into manual methods based on dependency prompts.

Related recommendations:

Detailed explanation of GO in SQL Server

Getting started with python statements (if statement, while statement, for statement)

The above is the detailed content of Install the go language plug-in in Visual Studio Code. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template