-s and -a flags are aliases for the same operation: they update the workspace symlinks and version file to point at a different installed Go version.
Syntax
The Go version to activate in
X.Y.Z format (e.g. 1.23.4). The version must already be installed in your workspace.Examples
What it does
Check the workspace
igo verifies that the workspace directory (default:
~/go) exists. If no Go versions have been installed, the command exits.Read the current active version
igo reads
~/go/version to determine which version is currently active.Check if already on the requested version
If the requested version matches the currently active version, igo prints
Already using version <version> and exits without making any changes.Verify the target version is installed
igo checks that
~/go/versions/<version> exists. If the directory is not found, the command exits without making changes.Replace symlinks
The existing
bin, path, and root symlinks in the workspace are removed and recreated pointing at the new version’s directories:| Symlink | New target |
|---|---|
~/go/root | ~/go/versions/<version>/go |
~/go/bin | ~/go/versions/<version>/go/bin |
~/go/path | ~/go/versions/<version> |