Is there any good way to switch go version in macos?
if using python, we can define python2, python2.7, python3, python3.5 to use different version. but what about go?
we know the go install directory is GOROOT:
$ go env GOROOT /usr/local/go in macOS there usually only one installed. is it possible to install multi go in macOS and switch easily?
{that_dir}/bin/gothan entry-point program knows how to access all the other programs it calls—so that all that tools are of the correct version. I for one, merely have a local Git clone of the upstream repo and usegit worktree add+go buildto build the next upstream release with the previous one, so I naturally end up with multiple Go installations. One of them is made "main" by adding itsbindirectory to the contents of thePATHenvironment variable.