NOTE: This is heavily outdated Gist snippet from 2017.
Install Go language with a Bash script
Another alternative to installing Go is to use a simple Bash script. It will download and install Go language under of your own user account.
Note that a system-wide installation might be better for some things (for example, better protected from accidental modifications etc.), but this was a bit simpler to setup.
For this example, we are using:
mkdir -p ~/git/GitHub/canha
Clone Git repository
cd ~/git/GitHub/canha git clone https://github.com/canha/golang-tools-install-script cd golang-tools-install-script/
Install a 64-bit version
bash goinstall.sh --64
Script downloads the version specified in the Bash script
(at the moment 1.9.2) and installs it to
Check that it was added to your shell config
Reload your shell
Try if it works
That should show a quick help for the