Go CLI Cheat Sheet/Allow auto toolchain selection

Let the go command choose a newer toolchain if needed.

Section: Toolchains and Env

Allow auto toolchain selection

bash
bash
GOTOOLCHAIN=auto go version
Explanation

Let the go command choose a newer toolchain if needed. Useful in Go CLI workflows.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Toolchains and Env
Force local toolchain
Run with the bundled/local toolchain only.
OpenIn sheetbashsame section
Persist Go env value
Write a Go env default into the user config.
OpenIn sheetbashsame section
Unset persisted env value
Remove a persisted Go env setting.
OpenIn sheetbashsame section
Show V8 options through go tool
Pass through to tool-specific options when needed.
OpenIn sheetbashsame section
Print Go version
Show the selected Go toolchain version.
OpenIn sheetbash1 tag match
Run program
Compile and run the current module entrypoint.
OpenIn sheetbash1 tag match