[go] cmd/go: revert update default go directive in mod or work init

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Mar 4, 2026, 1:38:42 PM (24 hours ago) Mar 4
to Michael Matloob, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Cherry Mui, Ian Alexander, Dmitri Shuralyov, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
cmd/go: revert update default go directive in mod or work init

This restores the previous behavior of setting go directive to the toolchain's version as per #77653.

Fixes #77653
Change-Id: Ie9d2de025a75f39fd8d6d01776d0cf4e5da954f9
Reviewed-by: Dmitri Shuralyov <dmit...@golang.org>
Reviewed-by: Ian Alexander <ji...@google.com>
Reviewed-by: Cherry Mui <cher...@google.com>
Auto-Submit: Cherry Mui <cher...@google.com>
Files:
  • M src/cmd/go/internal/modload/init.go
  • M src/cmd/go/internal/workcmd/init.go
  • M src/cmd/go/testdata/script/mod_edit.txt
  • D src/cmd/go/testdata/script/mod_init_version.txt
  • M src/cmd/go/testdata/script/work.txt
  • M src/cmd/go/testdata/script/work_edit.txt
  • M src/cmd/go/testdata/script/work_init_path.txt
  • M src/cmd/go/testdata/script/work_init_toolchain.txt
  • D src/cmd/go/testdata/script/work_init_version.txt
  • M src/cmd/go/testdata/script/work_sync_toolchain.txt
  • M src/cmd/go/testdata/script/work_use_toolchain.txt
Change size: M
Delta: 11 files changed, 60 insertions(+), 171 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Dmitri Shuralyov, +2 by Ian Alexander, +1 by Cherry Mui
  • 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: go
Gerrit-Branch: master
Gerrit-Change-Id: Ie9d2de025a75f39fd8d6d01776d0cf4e5da954f9
Gerrit-Change-Number: 749980
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Ian Alexander <ji...@google.com>
Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
open
diffy
satisfied_requirement

Cherry Mui (Gerrit)

unread,
Mar 4, 2026, 1:38:57 PM (24 hours ago) Mar 4
to Michael Matloob, Michael Matloob, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Austin Clements, Dmitri Shuralyov, Dmitri Shuralyov, golang-co...@googlegroups.com

Cherry Mui submitted the change

Change information

Commit message:
[release-branch.go1.26] cmd/go: revert update default go directive in mod or work init


This restores the previous behavior of setting go directive to the toolchain's version as per #77653.

For #77653
Fixes #77860
Change-Id: Ie9d2de025a75f39fd8d6d01776d0cf4e5da954f9
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Reviewed-by: Austin Clements <aus...@google.com>
Files:
  • M src/cmd/go/internal/modload/init.go
  • M src/cmd/go/internal/workcmd/init.go
  • M src/cmd/go/testdata/script/mod_edit.txt
  • D src/cmd/go/testdata/script/mod_init_version.txt
  • M src/cmd/go/testdata/script/work.txt
  • M src/cmd/go/testdata/script/work_edit.txt
  • M src/cmd/go/testdata/script/work_init_path.txt
  • M src/cmd/go/testdata/script/work_init_toolchain.txt
  • D src/cmd/go/testdata/script/work_init_version.txt
  • M src/cmd/go/testdata/script/work_sync_toolchain.txt
  • M src/cmd/go/testdata/script/work_use_toolchain.txt
Change size: M
Delta: 11 files changed, 60 insertions(+), 171 deletions(-)
Branch: refs/heads/release-branch.go1.26
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Austin Clements, +2 by Dmitri Shuralyov
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: release-branch.go1.26
Gerrit-Change-Id: Ie9d2de025a75f39fd8d6d01776d0cf4e5da954f9
Gerrit-Change-Number: 749948
Gerrit-PatchSet: 4
Gerrit-Owner: Michael Matloob <mat...@google.com>
Gerrit-Reviewer: Austin Clements <aus...@google.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Michael Matloob <mat...@google.com>
Gerrit-CC: Michael Matloob <mat...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages