Skip to content
Upgrading go in 40 lines of bash
Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
img
LICENSE
README.md
upgrade_go_linux.sh

README.md

upgrade-go

Upgrading go in 40 lines of bash. Blog post here.

Requirements

  • Linux system with golang installed (usually to /usr/local/go)
  • A user with sudo privileges
  • Internet access
  • curl
  • tar
  • gzip

Sample Output

chad@dev-vm:~$ ./upgrade_go_linux.sh
This will upgrade go... are you sure? (Y/N) y
Found: https://dl.google.com/go/go1.12.9.linux-amd64.tar.gz
Downloading now...
Downloaded 127961523 bytes in 4.606516s
Uncompressing: go1.12.9.linux-amd64.tar.gz
Updated to go version go1.12.9 linux/amd64!
You can’t perform that action at this time.