[website] _content/doc/go1.26: add note for lower go mod init go directive version

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Dec 22, 2025, 4:24:43 PM (18 hours ago) Dec 22
to Michael Matloob, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Michael Matloob, Dmitri Shuralyov, Dmitri Shuralyov, golang-co...@googlegroups.com

Gopher Robot submitted the change with unreviewed changes

Unreviewed changes

2 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: _content/doc/go1.26.md
Insertions: 8, Deletions: 6.

@@ -50,13 +50,15 @@
### Go command {#go-command}

<!-- go.dev/issue/74748 -->
-`go mod init` now sets a lower `go` version in new `go.mod files`. `go mod init`
+`go mod init` now defaults to a lower `go` version in new `go.mod` files. `go mod init`
using a toolchain of version `1.N.X` will create a `go.mod` file
-specifying the Go version `go 1.N-1.0`. Pre-release versions of `1.N` will
-create `go.mod` files specifying `go 1.N-2.0`. In practice this means Go 1.26
-release candidates will create `go.mod` files with `go 1.24.0` and releases
-will create `go.mod` files with `go 1.25.0`. This is intended to encourage
-the creation of modules that are compatible with currently supported versions of Go.
+specifying the Go version `go 1.(N-1).0`. Pre-release versions of `1.N` will
+create `go.mod` files specifying `go 1.(N-2).0`. In practice, this means Go 1.26
+release candidates will create `go.mod` files with `go 1.24.0`, and Go 1.26
+and its minor releases will create `go.mod` files with `go 1.25.0`. This is intended
+to encourage the creation of modules that are compatible with currently supported
+versions of Go. For additional control over the `go` version in new modules,
+`go mod init` can be followed up with `go get go@version`.

<!-- go.dev/issue/74667 -->
`cmd/doc`, and `go tool doc` have been deleted. `go doc` can be used as
```

Change information

Commit message:
_content/doc/go1.26: add note for lower go mod init go directive version
Change-Id: I4518c037238cd6316320e78381da76016a6a6964
Reviewed-by: Michael Matloob <mat...@google.com>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Auto-Submit: Michael Matloob <mat...@golang.org>
Reviewed-by: Dmitri Shuralyov <dmit...@golang.org>
Files:
Change size: S
Delta: 1 file changed, 11 insertions(+), 0 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Dmitri Shuralyov, +1 by Michael Matloob, +2 by Dmitri Shuralyov
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: website
Gerrit-Branch: master
Gerrit-Change-Id: I4518c037238cd6316320e78381da76016a6a6964
Gerrit-Change-Number: 731720
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Michael Matloob <mat...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages