From f13ad3e02e7c21e725ec871776e13e7e72878ca9 Mon Sep 17 00:00:00 2001 From: koolhead17 Date: Wed, 30 Dec 2015 12:23:28 +0530 Subject: [PATCH] Modifed instructions for installing Go. --- INSTALLGO.md | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/INSTALLGO.md b/INSTALLGO.md index 745575f26..4dd444dee 100644 --- a/INSTALLGO.md +++ b/INSTALLGO.md @@ -23,9 +23,20 @@ Add the following exports to your ``~/.bashrc``. Environment variable GOROOT spe and GOPATH specifies the location of your project workspace. ```sh -$ export GOROOT=${HOME}/bin/go -$ export GOPATH=${HOME}/go -$ export PATH=$PATH:${HOME}/bin/go/bin:${GOPATH}/bin +export GOROOT=${HOME}/bin/go +export GOPATH=${HOME}/go +export PATH=$PATH:${HOME}/bin/go/bin:${GOPATH}/bin +``` +##### Source the new enviornment + +```sh +$ source ~/.bashrc +``` + +##### Testing it all + +```sh +$ go env ``` ## OS X (Yosemite) 10.10 @@ -57,8 +68,17 @@ Add the following exports to your ``~/.bash_profile``. Environment variable GORO and GOPATH specifies the location of your project workspace. ```sh -$ export GOPATH=${HOME}/go -$ export GOVERSION=$(brew list go | head -n 1 | cut -d '/' -f 6) -$ export GOROOT=$(brew --prefix)/Cellar/go/${GOVERSION}/libexec -$ export PATH=$PATH:${GOPATH}/bin +export GOPATH=${HOME}/go +export GOVERSION=$(brew list go | head -n 1 | cut -d '/' -f 6) +export GOROOT=$(brew --prefix)/Cellar/go/${GOVERSION}/libexec +export PATH=$PATH:${GOPATH}/bin +``` +##### Source the new enviornment +```sh +$ source ~/.bash_profile +``` +##### Testing it all + +```sh +$ go env ```