Golang Language Windows Environment setup

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

I am XP system;

1. First download the Go Language installation package, go to the following link, select the appropriate installation package for download (I use the Go1.0.3.windows-386.msi), and then install, record the installation of the root directory for configuration use.

Download Address: Https://code.google.com/p/go/downloads/list

Click Install, I install by default in path C:\Go


2. Download Liteide, go to the following link, select the appropriate installation package (I use the liteidex17.windows-webkit.7z), download the completion of the extract to any directory, and then into the root directory of the bin folder, Double-click Liteide.exe to open the software.

Download Address: Https://code.google.com/p/golangide/downloads/list
Software interface:


3. Configure Liteide information, the first time you open this IDE, you need to configure the relevant information to use correctly. Click "View" → "options" to open the Options page and select Liteenv in the list:


4. Modify the corresponding file for your system. I am a 32-bit system, so I need to modify win32-user.env and win32.env. The contents of the amendment are as follows:


#nativecompilerwindows386
Goroot=c:\go
Gobin=c:\go\bin
Goarch=386
Goos=windows
Cgo_enabled=1
path=%gobin%;%goroot%\bin;%path%
Liteide_gdb=gdb
Liteide_make=mingw32-make
liteide_term=%comspec%
liteide_termargs=
liteide_exec=%comspec%
Liteide_execopt=/c
Both Goroot and Gobin are configured according to the directory selected in the previous Go language installation. The path I chose when I installed the Go language was C:\Go

5. Configure Gopath, click "View" → "Set Gopath", click Browse in the custom Gopath in the open window, select the folder you want to store the Go project later, add and select OK. : Custom Gopath is a workspace.

6. Close the IDE, reopen, after clicking on "View" → "tool Window" → "package browse", open the package browse, if you can see the Go directory, you can use.


You can ignore the one on the F-drive above.

All of you understand that learning any voice is HelloWorld start. Let's start the HelloWorld tour of Go voice.

Select New from the Start page, select Go1 Command Project from the template, and click OK. The HelloWorld program is automatically generated ~


Click the Buildandrun button at the top of the edit window to run the program and get the output in the Compile Output window. Click the BR button at the top of the edit window to run the program and get the output in the Compile Output window.


Results:


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.