Skip to content

Conversation

@silverwind
Copy link
Member

@silverwind silverwind commented Nov 8, 2025

From docs:

The go line declares the minimum required Go version for using the module or workspace. For compatibility reasons, if the go line is omitted from a go.mod file, the module is considered to have an implicit go 1.16 line, and if the go line is omitted from a go.work file, the workspace is considered to have an implicit go 1.18 line.

The toolchain line declares a suggested toolchain to use with the module or workspace. As described in “Go toolchain selection” below, the go command may run this specific toolchain when operating in that module or workspace if the default toolchain’s version is less than the suggested toolchain’s version. If the toolchain line is omitted, the module or workspace is considered to have an implicit toolchain goV line, where V is the Go version from the go line.

This is better than setting go to the latest version which may break builds when that go version is unavailable, for example with GOTOOLCHAIN=local in the official go docker images.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 8, 2025
@silverwind
Copy link
Member Author

silverwind commented Nov 8, 2025

BTW any security scanner that is hitting on the go 1.25.0 line is broken and does not understand that this is a minimum version, not an exact version.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Nov 8, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 8, 2025
@denyskon denyskon enabled auto-merge (squash) November 8, 2025 19:18
@denyskon denyskon added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Nov 8, 2025
@denyskon denyskon merged commit c12bc4a into go-gitea:main Nov 8, 2025
25 checks passed
@GiteaBot GiteaBot added this to the 1.26.0 milestone Nov 8, 2025
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Nov 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants