Golang Development Environment Configuration (LINUX)

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

      • Installing Golang
      • Install vs Code
      • Configuring the Debug environment

Installing Golang

1. Download the Golang installation package
2. Unzip to the installation path:
$HOME/your_path -xzf go$VERSION.$OS-$ARCH.tar.gz
3. Set the environment variable Goroot, Gopath, and add the bin directory to path:
export GOROOT=$HOMEexport PATH=$PATH:$GOROOT/binexport GOPATH=$HOME/work/mygo

Install vs Code

    1. Download install vs Code and install the Golang plugin
    2. Tools Required for installing plugins
    3. Go get will have half error, mainly golang.org/x/the following list of items cannot be accessed. These projects are actually hosted on GitHub, but the path remains the original path to remain compatible, so create the $GOPATH/src/ corresponding directory in the directory: mkdir $GOPATH/src/golang.org/x/ then go to github and download the repo locally.git clone https://github.com/golang/tools

Configuring the Debug environment

    1. Installing delvego get github.com/derekparker/delve/cmd/dlv
    2. Configure the Launch.json file, "program" is the path where the debug files are located
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.