Skip to content

Instantly share code, notes, and snippets.

@neonxp
Last active July 13, 2022 14:11
Show Gist options
  • Save neonxp/b67684eac7a68455f098bb593ad01265 to your computer and use it in GitHub Desktop.
Save neonxp/b67684eac7a68455f098bb593ad01265 to your computer and use it in GitHub Desktop.
Simple version manager for golang
#!/bin/sh
if [ ! -f $HOME/go/bin/go$1 ]; then
echo "Version $1 not found, trying to install"
go install golang.org/dl/go$1\@latest
go$1 download
fi
rm $HOME/go/bin/go || true
echo "Linking go to version $1"
ln -s $HOME/go/bin/go$1 $HOME/go/bin/go
@neonxp
Copy link
Author

neonxp commented Jul 13, 2022

gvm

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