This is a creation in Article, where the information may have evolved or changed.
Go Download Address:
Http://code.google.com/p/go/downloads/list
Go Official installation Address:
Http://golang.org/doc/install
Also collect some address about go:
Go official website http://golang.org/
Go Chinese official website http://golang-china.org/
Chinese Forum (in beta ...) http://bbs.golang-china.org/
Chinese user Discussion Group (mail) https://groups.google.com/group/golang-china/
Chinese translation (SVN) http://code.google.com/p/golang-china/
GitHub and Google Code sync (GIT) Http://github.com/border/golang-china
Eclipse Online Install plugin address:
http://goclipse.googlecode.com/svn/trunk/goclipse-update-site/
But Sublime Text 2 is also an artifact.
Installation (System ubt12.10):
sudo add-apt-repository ppa:webupd8team/sublime-text-2sudo apt-GetUpdate sudo add-apt-repository ppa:webupd8team/sublime-text-2sudo apt-GetInstall sublime-text-2-Beta sudo apt-GetInstall Bison ed gawk gcc Libc6-dev Make-y sudo apt-GetInstall Python-setuptools Python-dev build-essential-y Hg Clone-R Release https://Go.googlecode.com/hg/gosudo apt-GetInstall Mercurial-y Hg Clone-R Release https://Go.googlecode.com/hg/goEcho"export goroot= $HOME/go">> ~/. BASHRC Echo"export path= $PATH: $GOROOT/bin">> ~/. BASHRC Source~/.bashrc
Next comes a little bit of a problem:
smp@smp:~$ 8g-v8g:command not found
However, it is possible to enter the Go Godoc command, which is suspected to be an environment variable problem. So we find the 8g directory
smp@smp:~/go/pkg/tool/linux_386$ Find ~/go -name 8g/home/smp/go/.hg/store/data/src/cmd/8g /home/smp/go/pkg/tool/linux_386/8g/home/smp/go/src/cmd/8g
The environment variable file is then modified. BASHRC as follows:
Export goroot= $HOME/goexport PATH= $PATH: $GOROOT/bin: $GOROOT/pkg/tool/linux_386/
Personally like Sublime editor, install Gosublime as follows:
CTRL + ' Open the command line and execute the following code
Import Urllib2,os; pf='Package Control.sublime-package'; Ipp=sublime.installed_packages_path (); Os.makedirs (IPP)ifNot Os.path.exists (IPP)ElseNone; Urllib2.install_opener (Urllib2.build_opener (urllib2. Proxyhandler ())); Open (Os.path.join (IPP,PF),'WB'). Write (Urllib2.urlopen ('http://sublime.wbond.net/'+pf.replace (' ','%20'). read ()); Print'Restart Sublime Text to finish installation'
When the installation is complete, you will be prompted to restart the software, and then you will see a menu item under the Preferences menu, the package Control
To install the Gosublime plug-in, press and hold ctrl+shift+p to bring up a session box, enter "Install" in IT and return
Then enter "Gosublime", select and enter,
Then enter "Go Build",
Modify the Gosublime configuration: Under the Preferences menu, locate the package Settings, find gosublime, and then find Settings-default. To open the file again, add the following configuration
" Env " : { "path":"/home/smp/go/bin" # This path is based on your own modifications },
After the installation is complete, create a new file and select Go in the Tools Select Build System
New Helloword
" FMT " Func Main () { fmt. Println ("hello")}
The results of the operation are as follows:
smp@smp:~$ go run/tmp/test.go Hello
You can also use sublime ctrl+b to execute the go shell directly