0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-11-10 13:31:01 -05:00

Add toolchain directive to go.mod (#35901)

From [docs](https://go.dev/doc/toolchain#config):

> 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](https://go.dev/doc/toolchain#select)” 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.
This commit is contained in:
silverwind
2025-11-08 20:48:16 +01:00
committed by GitHub
parent 367a289b29
commit c12bc4aa30

4
go.mod
View File

@@ -1,6 +1,8 @@
module code.gitea.io/gitea module code.gitea.io/gitea
go 1.25.4 go 1.25.0
toolchain go1.25.4
// rfc5280 said: "The serial number is an integer assigned by the CA to each certificate." // rfc5280 said: "The serial number is an integer assigned by the CA to each certificate."
// But some CAs use negative serial number, just relax the check. related: // But some CAs use negative serial number, just relax the check. related: