solodynamo / go-init

The only Golang script you will ever need to get started .... πŸƒ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


go-init


The simple no fuss solution to your Go ambitions.

go-init:

  • 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

Install

# 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 git@github.com:solodynamo/go-init.git

# Do this
$ sudo chmod +x goinit.sh

Usage

  • install go
./goinit.sh
  • removes go
./goinit.sh -goaway

Example


go-init-snap


Info

Path set for $GOROOT and $GOPATH

export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=$HOME/goworkspace
export PATH=$PATH:$GOPATH/bin

Contribute

Always do :)

Quirk

If you see a halt after running the script, type exit and enter and keep doing this until things are done :)

License

MIT Β© Solodynamo

About

The only Golang script you will ever need to get started .... πŸƒ

License:MIT License


Languages

Language:Shell 100.0%