VS Code Editor Configuration Go Environment

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

VS Codeis a Microsoft-produced editor, and Atom , Sublime Text Similarly, can be integrated with third-party plug-ins, here is mainly about the VS Code configuration method, because VS Code the code hints to do better

    • First make sure the plugin is installed and the reboot go is in effect

    • When editing the go file, you will be prompted to install, this time can be determined to install all, over time we found that there are several plugins will fail to install, this time we need to manually install

    • Take Windows as an example, set up environment variables GOPATH and git install them by downloading the toolkit.

md %GOPATH%\src\github.com\golangcd %GOPATH%\src\github.com\golanggit clone https://github.com/golang/tools.git toolsmd %GOPATH%\src\golang.org\x\toolsxcopy /s /e %GOPATH%\src\github.com\golang\tools
    • Then perform the following actions:
  Go install github.com/nsf/gocodego install Sourcegraph.com/sqs/goreturnsgo install Github.com/golang/lint /golintgo Install Github.com/newhook/go-symbolsgo install Golang.org/x/tools/cmd/gurugo install golang.org/x/tools/ Cmd/gorenamego Install github.com/rogpeppe/godefgo install github.com/lukehoban/go-outline  
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.