1. Download Goclipse Eclipse plugins
http://goclipse.googlecode.com/svn/trunk/goclipse-update-site/(recommended to use proxy download, unless you can directly access;))
I uploaded the latest goclipse plug-in package in Baidu Web disk, provide download: Http://pan.baidu.com/s/1mgBR2Co
SHA1 hash:c43f10a00e509848c3016dbaa8162209daf00d4f
MD5 Hash:81875edbbb493cbe2c13519273079da2
After installing the plug-in, you can see a Golang logo in the upper right corner of Eclipse, the Gopher icon:
2. Download Golang, debug tools
Download Golang Windows version currently using Go1.3.3.windows-386.zip:https://storage.googleapis.com/golang/go1.3.3.windows-386.zip
Use proxy to access the site to get the latest version: https://golang.org/dl/
Download Liteidex24.3.windows.7z:https://github.com/visualfc/liteide#website
The main use of liteide inside the GDB (for Debugging Go Program), and Gocode (to ecplise Add code automatically hint), of course, can also use liteide to develop the go APP
Golang1.3.3-windows-386 has been put to Baidu-network disk, to provide download: Http://pan.baidu.com/s/1jGuu8eU
The file check code is:
SHA1 hash:ba99083b22e0b22b560bb2d28b9b99b405d01b6b
MD5 Hash:17d08e9801f239680b21b42c94c877ae
3. Configuration parameters
Unzip go1.3.3.windows-386.zip to directory such as: E:\go
Unzip the Liteidex to the directory, as
Configuring Golang Environment Variables
Goroot = E:\go
Path increases%goroot%\bin;
Command line enter go version to view go versions:
Configure the Liteide Golang environment:
Configure Eclipse Go Preferences:
Debugger Governor selection: E:\ProgramFiles\liteide\bin\gdb.exe (under Liteide)
Gocode Code hint configuration:
After installing Goclipse, Gocode is selected according to the version of Windows,
such as%eclipse_home%\plugins\com.googlecode.goclipse.gocode_0.7.6.v450\tools\windows_386\gocode.exe
Configuration complete Eclipse new Go project:
Demo.go
Package Main
Import (
"FMT"
"Io/ioutil"
"Net/http"
)
Func Main () {
URL: = "http://www.baidu.com"
Resp, _: = Getbyproxy (URL)
Fmt. Println (RESP)
Defer resp. Body.close ()
Body, _: = Ioutil. ReadAll (resp. Body)
Fmt. Println (String (body))
}
HTTP Get by proxy
Func getbyproxy (url_addr string) (*http. Response, error) {
Request, Err: = http. Newrequest ("GET", url_addr, nil)
If err! = Nil {
return nil, err
}
Return HTTP. Defaultclient.do (Request)
}
Eclipse installation under Windows Goclipse Configuration Golang development environment