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.