Configuring the Golang development environment under eclipse

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

Linux (Debian gnu/linux 9 (Stretch) 64-bit) settings

1. Download the latest version of Eclipse, I downloaded the eclipse-jee-oxygen-r-linux-gtk-x86_64.tar.gz

2. Download the latest version of Go (domestic seems to be unable to access, you can try the domestic go Chinese web download), I downloaded the go1.8.3.linux-amd64.tar.gz

3. Setting up the GO system environment

Unzip the downloaded go package into the/usr/local/go directory

Increase in/etc/profile:

export GOROOT=/usr/local/goexport GOPATH=/home/xxxx/goexport PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

Some machines need to be restarted (preferably restarted)

4.Eclipse Download Install Goclipse plugin

Help-->> Eclipse Marketplace

5. Set Goclipse

Window-->> Preferences

Set the root directory of Go

Set the Go tool formatting code, hints, etc.

Setting the Debug function

Linux Debian uses apt to install GDB tools

root@debian:/home# apt list gdbgdb/stable,now 7.12-6 amd64 [已安装]root@debian:/home# apt install gdb -y

6 To this end, you can build a go project with eclipse

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.