Debian System Development GO language

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

The official website address is:

http://golang.org/

Chinese Translation Project:

http://code.google.com/p/golang-china/

Eclipse Plugin Address:

http://code.google.com/p/goclipse/

Updated URL address:

http://goclipse.googlecode.com/svn/trunk/goclipse-update-site/

The first is to install the GO environment

You can see the installation documentation:

Http://code.google.com/p/golang-china/wiki/Install

Need to download HG tool

Debian uses the installation and compilation environment:

Apt - Get Install Python - Setuptools python - Dev Build - Essential

Then download:

- r release HTTPS : //go.googlecode.com/hg/go

To compile:

CentOS Install

Yum Install HG

Yum Install Bison GCC

Sh/opt/google/go/src/all.bash


It takes a long wait to start compiling



Setup needs to be set under environment variables:

Export path= $PATH:/opt/google/go/bin



I'm going to install go under OPT.

Go command has 6g is compiled, 6l is to connect.
Then the execution.

Package Mainimport "FMT" Func Main () {        fmt. Printf ("Hello, world\n")}

Write Hello world.


Then compile, connect, and execute.

Start installing eclipse below:

http://goclipse.googlecode.com/svn/trunk/goclipse-update-site/


Then restart Eclipse.

Restarting will reveal that Eclipse has a more go environment.


First set up the Go directory:


If the directory is correct. The Compile connection field is added.

Create a test project:


Then note Be sure to create the source file in the Cmd folder otherwise do not allow the main function to be allowed.


Go grammar What can learn

http://code.google.com/p/golang-china/

Read more from this.

Of course the simple Hello world is nothing to see. To get started, simply copy the Go Test folder to see how someone wrote it.


The files under the test directory can be compiled and run. But some of the IDE's display is not normal. Error.

In short, the environment can be built. The next step is to learn grammar. Continue with the update.

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.