Sublime Text 3 Installation Golang environment

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

1, install sublime text 3, the current Gosublime no longer support sublime Text2
2. After installation, open sublime, install package control, open console control+ ', Input in console:

Import Urllib.request,os,hashlib; H=' 7183a2d3e96f11eeadd761d777e62404 '+' e330c659d4bb41d3bdf022e94cab3cd0 '; 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))ifDH! = hElse Open(Os.path.join (IPP, PF),' WB ').Write( by)

3, restart Sublime, open preferences, more than the package control and its setting, installation success
4, Ctrl+shift+p Open the Control Panel Select Install packages, install Gosublime
5. Set Gosublime,preferences->package-setting->user:

{    "env{        "GOPATH": "/Users/XXX/mygo",        "GOROOT": "/usr/local/Cellar/go/1.6.2/libexec"    }}

6. Set go build, Tools->build system->new Build:

{     "shell_cmd":  "go build $filename"}
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.