: Eclipse installation under Windows Goclipse Configuration Golang development environment

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

Eclipse installation under Windows Goclipse Configuration Golang development environment

Eclipse installation under Windows Goclipse Configuration Golang development environment, Liteide Golang configuration is introduced

1. Download Goclipse Eclipse plugins

Http://pan.baidu.com/s/1c0weLgO

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:BA99083B22E0B22B560BB2D28B9B99B405D01B6BMD5 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)

}

Related Article

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.