I’m a veteran dev but I’m new to Go…
The following quotes seem to indicate that “auto” is not the default. At least, not if you haven’t run some command to set it at a default (and I’m not seeing one).
> If the $GOROOT/go.env file is missing or does not set a default, the go command assumes GOTOOLCHAIN=local.
> When GOTOOLCHAIN is set to local, the go command always runs the bundled Go toolchain.
In the intro, however, it does say:
> The default GOTOOLCHAIN setting is auto, which enables the toolchain switching described earlier.
I guess I’m also confused. :/
Note that go.work is only created by the `go work init` command when you intend to use multiple modules in one directory. I’m guessing that doing this is relatively unusual. This could be how a “default” gets set for newer versions (unconfirmed conjecture on my part).
I don’t see any command that creates a `go.env` and therefore might set GOTOOLCHAIN in that file.
The only other thing I can think of is that `go mod init` could set this to “auto” in the `go.mod` of a new project. But, go.env is probably missing in this case.
Ref: https://go.dev/doc/toolchain