Mac OS X Installation Golang

Source: Internet
Author: User
Tags mercurial sublime text

1. Make sure Mac OS X is installed with GIT,HG, install Xcode CommandLine tools under Mac OS X 10.8+, install Xcode on more than 10.9 installs the Git tool, Hg Please install sourcetree, this git The GUI tool contains the mercurial tool

2. Download and install Go1.3.1.darwin-amd64-osx10.8.pkg

3. Install sublime Text, once install plug-in, gosublime, configure Gosublime-settings-user file, remember not to change any default file, for example: Gosublime-setting-user write

{
"ENV":
{
"Gopath": "$HOME/documents/gopath/",
"Goroot": "/usr/local/go"
}
}

4. Set Gopath

5. Set Gopath considerations to create a new. bash_profile file under the current user's home directory

Write

#This is my personal bash_profile,when loaded at login.

#===2014-09-04===

#GOPATH

Export Gopath= $HOME/documents/gopath

#PATH

Export path= $PATH: $GOPATH/bin


Then execute the source. Bash_profile

6.OK enter go env to see the right go environment

7. You can enter export to view all shell environment configurations for the current user


Using the Google sample code or installing local Gotour requires the use of the HG command, Mac OS x is not installed by default and can be installed using homebrew

# Mac OS (homebrew) $ brew Install mercurial below is how the other OS is installed
# debian/ubuntu$ Apt-get Install mercurial# fedora$ yum install mercurial# gentoo$ emerge mercurial# Mac OS (homebrew) $ br EW Install mercurial# freebsd$ cd/usr/ports/devel/mercurial$ make install# Solaris express$ pkg Install Sunwmercurialm Ercurial SCM Official Website: http://mercurial.selenic.com/


Mac OS X Installation Golang

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.