go-install - download and extract a golang official binary to /usr/local/go
$ gem install go-install
(you may need to run as root or through sudo.)
go-install version
Examples
$ sudo go-install latest
$ sudo go-install 1.11.1
$ sudo go-install 1.10.4
PATH setting
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:$HOME/go/bin
Bug reports and pull requests are welcome on GitHub at https://github.com/s3fxn/go-install.
The gem is available as open source under the terms of the MIT License.