Skip to content

Instantly share code, notes, and snippets.

@icio
Created Feb 19, 2021
Embed
What would you like to do?
usego script for installing any Go version (including tip) into ~/sdk using https://pkg.go.dev/golang.org/dl/
#!/bin/sh
set -eu
VERS="${1:?Usage: $0 1.x.x}"
test -d ~/sdk || mkdir ~/sdk
cd ~/sdk
unset GOROOT
go get golang.org/dl/go$VERS
go$VERS download
test -d go && rm go
ln -s go$VERS go
( set -x; ~/sdk/go/bin/go version )
@icio

This comment has been minimized.

Copy link
Owner Author

@icio icio commented Feb 19, 2021

Usage: usego 1.16 or usego tip and have your GOROOT=$HOME/sdk/go and PATH=$GOROOT/bin:$PATH

@icio

This comment has been minimized.

Copy link
Owner Author

@icio icio commented Feb 19, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment