Windows Vscode in Install Go Toolkit, absolutely useful, click, watch a year

Source: Internet
Author: User
Tags install go
This is a creation in Article, where the information may have evolved or changed.

First install the Go plugin in Vscode
Then when you run the go file, Vscode prompts you to install gopkgs and then selects install all.

There are six packages that will fail to install:
Golang.org/x/tools/cmd/guru
Golang.org/x/tools/cmd/gorename
Github.com/acroca/go-symbols
Github.com/ramya-rao-a/go-outline
Github.com/sqs/goreturns
Github.com/golang/lint/golint


The reason is that there is no corresponding file under the Golang.org/x/tools folder under SRC
For example:
Golang.org/x/tools/cmd/guru Correspondence Golang.org/x/tools/cmd/guru
Golang.org/x/tools/cmd/gorename Correspondence Golang.org/x/tools/cmd/gorename
Github.com/acroca/go-symbols Correspondence Golang.org/x/tools/go/buildutil
Github.com/ramya-rao-a/go-outline Correspondence Golang.org/x/tools/go/buildutil
Github.com/sqs/goreturns Correspondence Golang.org/x/tools/imports


So create a new golang.org/x/folder under SRC
Then CD to the golang.org/x folder
Execute git clone http://github.com/golang/tools
A more Tools folder will be found under the Golang.org/x folder

You can see that the corresponding file is already available, then CD to:
Golang.org/x/tools/cmd/guru Execute Go Install
Golang.org/x/tools/cmd/gorename Execute Go Install
Github.com/acroca/go-symbols Execute Go Install
Github.com/ramya-rao-a/go-outline Execute Go Install
Github.com/sqs/goreturns Execute Go Install

The Golint package is a bit special and should be installed like tools in the Golang.org/x folder:
git clone http://github.com/golang/lint
At this time golang.org/x will be more than one lint folder
And now Github.com/golang/lint/golint has the corresponding file.
Last CD to Github.com/golang/lint/golint folder, execute go install

The installation package is finally installed.

I am golang novice, above is my personal understanding, should have the mistake, also please understand ...

559 Reads
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.