Configuring Vscode under Golang development environment

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

From:

Https://www.golangtc.com/t/564d30cfb09ecc72c30000b1 #30 's comments in this article, original for Https://www.golangtc.com/member/txgo

Original

Txgo 2016-02-25 09:01

I share a little bit of the installation process, mainly Qiang issues.

Os:ubuntu 15.10
Other tools: Git

    1. Install go, the site has downloaded, after the installation is complete configuration goroot and Gopath environment variables, and go env confirmed
    2. Install Lantern, refer to Https://github.com/getlantern/lantern instructions, directly download the binary file on the line (Ubuntu/debain) there is a. deb package, started after installation, the default proxy address is open HTTP (s)://localhost:8787 The following large file download if the download is unsuccessful, you can use this proxy.
    3. Follow the body of this post to install Vscode, and go to plug-in center to install Golang plugin support
    4. Install plugin must tool, this step is most annoying, go get will have half error, originally is Qiang, this station can under corresponding package,
    5. I took another approach: GitHub. The practice is to start with godoc-http:6060, browser browsing http://localhost:6060/pkg/#other can see the list of items under golang.org/x/, which are actually hosted on GitHub, But the path remains compatible with the original path, so now $GOPATH create the corresponding directory under the/src/directory: mkdir $GOPATH/src/golang.org/x/and then go to GitHub and download repo locally, like the Net project is in the $ Run git clone https://github.com/golang/net.git in the gopath/src/golang.org/x/directory and return to the 4th step until all the tools can be run at the command line
    6. The installation is complete and these are in place, finally follow the Go plugin configuration, open Vscode Click File->preferences->user Settings, on the right Settings.json (located in $home/.config/ Code/user directory), configure, Go.goroot, Go.gopath confirm that you want to configure to the correct directory, other can experiment, all the options on the left column can override the default value.
      The basic installation configuration can be completed.
    7. If you need debug, you need to install delve and configure it, and it is recommended to install it directly with GitHub repo.
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.