go install golang.org/dl/goX.X.X@latest
goX.X.X download
# Confirm
goX.X.X version
Enter any version in X.X.X
.
Version List
You can temporarily switch versions with the following command.
export GOROOT=$(goX.X.X env GOROOT)
export PATH="${GOROOT}/bin:${PATH}"
Enter any version in X.X.X
.