Use toolchain of Go 1.22
What does this MR do?
Change the go
directive of go.mod
so that the version of the Go toolchain matches the version of Go.
See https://go.dev/doc/toolchain
Starting in Go 1.21, the Go distribution consists of a go command and a bundled Go toolchain, which is the standard library as well as the compiler, assembler, and other tools. The go command can use its bundled Go toolchain as well as other versions that it finds in the local PATH or downloads as needed.
The choice of Go toolchain being used depends on the GOTOOLCHAIN environment setting and the go and toolchain lines in the main module’s go.mod file or the current workspace’s go.work file. As you move between different main modules and workspaces, the toolchain version being used can vary, just as module dependency versions do.
See https://gitlab.slack.com/archives/C3GAUSL85/p1720543522197439
NOTE: We might also want to upgrade the Go toolchain that comes with the gemnasium
image.
However, this is not directly related.
Also, based on the above, it seems that this is only cache since the toolchain can downloaded at runtime.
But then the image might no longer run offline.
What are the relevant issue numbers?
None
Does this MR meet the acceptance criteria?
Changelog entry added-
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer