Inspired by NVM, a Golang version management toy, created by some dummy programmer dude :)
Using cURL:
curl -o- https://raw.githubusercontent.com/sintan1071/govm/master/.install.sh | bash
or Wget:
wget -qO- https://raw.githubusercontent.com/sintan1071/govm/master/.install.sh | bash
After installation, you should reopen your terminal window or you can just run such a command:
find ~ -maxdepth 1 -name .\*rc
this command will show you the "your-sh-rc", then you can run the following command
source your-sh-rc
govm install 1.12.4
this command will install golang version 1.12.4
govm list
this command will show you the golang version you already installed
govm use 1.11.5
this commad will change the $GOROOT and your golang version to the version you inputed