Skip to content

Instantly share code, notes, and snippets.

@qrkourier
Created December 22, 2022 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qrkourier/0cc1a6a6d036125f6cefe715c90402e4 to your computer and use it in GitHub Desktop.
Save qrkourier/0cc1a6a6d036125f6cefe715c90402e4 to your computer and use it in GitHub Desktop.
LATEST_GOLANG=$(wget -qO- "https://go.dev/VERSION?m=text" | /bin/grep -Po '^go(\s+)?\K\d+\.\d+\.\d+$');
LATEST_GOLANG_ARCH=go${LATEST_GOLANG}.linux-$(dpkg --print-architecture).tar.gz;
wget -qO /tmp/${LATEST_GOLANG_ARCH} https://go.dev/dl/${LATEST_GOLANG_ARCH}
sudo tar -xf /tmp/${LATEST_GOLANG_ARCH} -C /usr/local/
echo "~/go/bin:/usr/local/go/bin:$PATH" >> ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment