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