Skip to content

Commit c12bc4a

Browse files
authored
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.
1 parent 367a289 commit c12bc4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module code.gitea.io/gitea
22

3-
go 1.25.4
3+
go 1.25.0
4+
5+
toolchain go1.25.4
46

57
// rfc5280 said: "The serial number is an integer assigned by the CA to each certificate."
68
// But some CAs use negative serial number, just relax the check. related:

0 commit comments

Comments
 (0)