The simple no fuss solution to your Go ambitions.
- Provides option to select the version of go to be downloaded.
- Downloads appropriate go binary of your selected version for your platform from official google source.
- Extracts the binary and runs it,
- Setups $GOROOT and $GOPATH by entering required path variables into your zsh or bash shell automatically.
- Removes the downloaded .gz file and cleans things up.
- Remove past installations using the script.
It is written with an aim to fasten golang setup.
Table of Contents
# wget or curl the script $ wget https://raw.githubusercontent.com/solodynamo/go-init/master/goinit.sh $ curl https://raw.githubusercontent.com/solodynamo/go-init/master/goinit.sh > goinit.sh # Alternatively you can clone the repo and use it. $ git clone email@example.com:solodynamo/go-init.git # Do this $ sudo chmod +x goinit.sh
- install go
- removes go
Path set for $GOROOT and $GOPATH
export GOROOT=$HOME/go export PATH=$PATH:$GOROOT/bin export GOPATH=$HOME/goworkspace export PATH=$PATH:$GOPATH/bin
Always do :)
If you see a halt after running the script, type
exit and enter and keep doing this until things are done :)