Skip to content

Instantly share code, notes, and snippets.

@miao1007
Created November 20, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miao1007/9adb1e5053220e0ed9bf to your computer and use it in GitHub Desktop.
Save miao1007/9adb1e5053220e0ed9bf to your computer and use it in GitHub Desktop.
Install Golang on Mac
#!/bin/sh
#install go with brew
brew update
brew install go
#make go dir
cd ~
mkdir goroot
mkdir gopath
echo '#set go env' >> ~/.bash_profile
echo 'export GOROOT=${HOME}/goroot' >> ~/.bash_profile
echo 'export GOPATH=${HOME}/gopath' >> ~/.bash_profile
source ~/.bash_profile
#(optional)install IDE
brew cask install liteide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment