Go Language Environment Building

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

1. Download Sublime Text 3 Connection: HTTP://WWW.SUBLIMETEXT.COM/3

2, download go language Environment package access Http://www.golangtc.com/download Select the version you need I'm using 1.5RC1. Select the installation package under Windows

It is recommended to select the. zip starting from the installation is not recommended to install the download after the decompression put to my computer under the G to activate the other do not appear in the Chinese directory (you know). Copy the go file to: G Packing Directory

3. Then we create a directory of Go files that will be the directory where your project will be

For example, we create a Goproject folder under the Local Disk G disk, which is the directory used to store the go file.

Then we create three files in the Goproject folder. Bin, package, src Why create these three folders?

Because in the go environment we need to have the main file bin and each time to use the package src actually very good understanding is that the source file is a bit like Java everyone

Now follow this to create, and later will detail in each folder will store what things in.

4, and then start to configure environment variables played PHP Java all know how to configure the following detailed how to configure

Right-click My Computer-"Properties-" Advanced system Settings-"Environment variable-" XX user's variable-"new-" Create note name case Create Goroot variable where the variable value is the location of the unpacked go environment package just downloaded in the 3rd step

Then we continue in the variable of XX user-"New-" Gopath variable is the Goproject folder we just created.

Then we select the system variable to find the path variable double-click Open Note After the next write must be in accordance with; Make a separate input on Go environment bin file and directory of bin file in Goproject OK save

"Note: D in the change to G-Disk"

5. Then we continue to download liteide (http://www.golangtc.com/download/liteide) Select:

After downloading the download, unzip to the local Disk D drive and then go to the file Select Bin directory selection:

Choose liteide that little gossip and then double-click Run to appear

6. Then we open the cmd command to enter Go version if it appears

Then congratulations on your installation success.

7. Then we open sublime Text 3 to select View under Show Console appears

Copy the following: Then press ENTER to wait for the installation

Import Urllib.request,os,hashlib; h = ' eb2297e1a458f27d836c04bb0cbaf282 ' + ' d0e7a3098092775ccb37ca9d6b2e4b7d '; PF = ' package control.sublime-package '; IPP = Sublime.installed_packages_path (); Urllib.request.install_opener (Urllib.request.build_opener (Urllib.request.ProxyHandler ())); by = Urllib.request.urlopen (' http://packagecontrol.io/' + pf.replace (', '%20 ')). read (); DH = hashlib.sha256 (by). Hexdigest (); Print (' Error validating download (got%s instead of%s), please try manual install '% (DH, h)) if DH! = H Else Open (Os.pat H.join (IPP, PF), ' WB '). Write (by) and then use the shortcut key shift+ ctrl+p Open the following window

The input PICP appears as follows select the first Pagckage controll:install package carriage return for installation

After successful installation, we enter Gosublime

8, Gosublime installation is complete, Preferences, package settings, Gosublime, Settings-uesrs needs to be configured under Gopath,goroot,


{"env": {"Gopath": "G:/goproject", "Goroot": "G:/go"}}

9, restart Sublime, in the Gopath src new hello.go file, you can see the code auto-completion has come out,:)

10, press CTRL + B, this time pop-up command box, enter go run hello.go

11, if you want to press CTRL + B direct execution, Tool "Bulid system" selected Gobuild "select New Bulid system, enter

Attach some references:

Go good Chinese web: http://studygolang.com/

Additional Installation Tutorials: http://blog.csdn.net/shuideyidi/article/details/38390809

or http://studygolang.com/articles/4454.

or http://my.oschina.net/kyo153/blog/158393.

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.