Ubuntu14.10下 安装配置Eclipse、Golang 开发环境
孔令春
posted @ 2015年2月01日 19:42
in
移动开发
with tags
Ubuntu Eclipse Golang
, 4947 阅读
每次换机器都要重新配置golang的开发环境,今天做一记录:
1 Eclipse
-
Install golang package: sudo apt-get install golang
-
Download Eclipse:sudo apt-get install eclipse
-
Start Eclipse
-
Go to Help->Install new software
-
Add Goclipse URL: https://github.com/GoClipse/releases/raw/master/
-
Select All Availible sites and search for goclipse, select and install.
-
Restart Eclipse when prompted.
2 Eclipse Go Settings
-
Go to Window-> Preferences
-
Select Go
-
GOROOT: /usr/lib/go
GOPATH: /usr/share/go
Go-tool path: /usr/bin/go
Go formatter: /usr/bin/gofmt
Go documentor: /usr/bin/godoc
3 GoCode for Autocompletion
-
Make sure you have git installed: sudo apt-get install git
-
Get gocode with: sudo go get -u github.com/nsf/gocode
-
In Eclipse go to Window-> Preferences
-
Select Go-> Gocode (Submenu)
-
Gocode path: /usr/lib/go/bin/gocode