Since go1.21 this directive supports the same version format as the toolchain directive[1] (though it doesn't support any suffixes). Specifically it supports formats such as:
1.20 (this was supported previously)
1.21.0
1.21rc1
Note: patch versions do not have release candidates (e.g. 1.21.1rc2 is not valid)
Since go1.21 this directive supports the same version format as the
toolchain
directive[1] (though it doesn't support any suffixes). Specifically it supports formats such as:1.20
(this was supported previously)1.21.0
1.21rc1
Note: patch versions do not have release candidates (e.g.
1.21.1rc2
is not valid)[1] https://go.dev/ref/mod#go-mod-file-go