Using sublime text to build the Go language development environment under Windows

Source: Internet
Author: User
Tags install go sublime text


* This article is based on its own experience, inevitably there is unreasonable. * The following content for the author's original, reproduced please indicate the source. 

First, installation 

1. Install Go

Go Install package Address: Http://pan.baidu.com/s/1hq1mrDM (Download the corresponding version in the directory shown in the arrow) 

* Note that the Go installation path cannot contain Chinese -------------------------------------------------------------------


After downloading installs, has the blog to say installs the go in this way does not need to set the environment variable (because has been set up automatically), but after attempts to discover this not to be possible (set not completely), still need to add environment variable. Contains:


-----------------------------------------------------------------------------------Goroot = E:\go (This assumes that the Go installation path is E:\go)GOBIN =%goroot%\binGoarch = 386 (if the system is 32 bits the value is 386, 64 bits is AMD64)GOOS = Windowsadd at the end of path;%goroot%\bin (note the preceding semicolon) For Gopath Understanding and setting please refer to: http://blog.csdn.net/huyoo/article/details/22715307 

* environment variable setting path: Right-click Computer--Properties--Advanced system settings-environment variables

* above environment variable, if not present, please add it yourself------------------------------------------------------------------------------------- after Setup is complete, run go in cmd, and if the Go Command's help appears, go is installed correctly.   

2. Installing Sublime 

Sublime installation package address: Http://pan.baidu.com/s/1i32abBJ after downloading the installation, open the software and click on the menu bar: Preferences-->package Control ( or use the shortcut key ctrl+shilft+p)Input: Install, select the option shown (click or enter)Enter: Gosublime, Click in the list, or select Enter


In the status bar, you are prompted to install:


Prompt to restart sublime after installation is complete:


Second, use  after completing the above steps, you can edit the go code in sublime, which will provide automatic completion, syntax highlighting and other functions, the code will be automatically formatted after the input ctrl+s save the code.

 input: Ctrl+b can bring up the console, where the code can be compiled and run (here the Test.go file is located on the desktop):

after compilation successful input: Test.exe output result




Using sublime text to build the Go language development environment under Windows


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.