Skip to content

Instantly share code, notes, and snippets.

@marshyski
Created January 17, 2024 23:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marshyski/bf86c6ff939096fc0d0952d05c28ac0b to your computer and use it in GitHub Desktop.
Save marshyski/bf86c6ff939096fc0d0952d05c28ac0b to your computer and use it in GitHub Desktop.
Download latest golang version for linux amd64
#!/bin/sh
GO_VERSION=$(curl -fsSL 'https://go.dev/VERSION?m=text' | head -n1)
GO_FILE="$GO_VERSION.linux-amd64.tar.gz"
GO_URL="https://go.dev/dl/$GO_FILE"
cd /usr/local || exit 1
curl -fsSLO "$GO_URL"
tar -zxvf "$GO_FILE"
rm -f "$GO_FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment