aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2023-12-11 12:42:16 -0500
committerCarlos Amedee <carlos@golang.org>2023-12-19 15:51:46 +0000
commit9dd1cde9ac0f1e935ed44d33f6b4668be538c1ed (patch)
treea50b0ba9e1acf2f54018bcf519200a4044bd3ea7
parent22284c34f2936d996a182daae3118dcff18a4d25 (diff)
downloadgo-9dd1cde9ac0f1e935ed44d33f6b4668be538c1ed.tar.gz
go-9dd1cde9ac0f1e935ed44d33f6b4668be538c1ed.zip
doc/go1.22,cmd/go: document that 'go mod init' no longer imports from other vendoring tools
This support was removed in CL 518776. For #61422. Fixes #53327. Change-Id: I8ad0f76aed5f03e32c4c2c5c0001c3f06beb3c7d Reviewed-on: https://go-review.googlesource.com/c/go/+/548877 Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
-rw-r--r--doc/go1.22.html4
-rw-r--r--src/cmd/go/alldocs.go3
-rw-r--r--src/cmd/go/internal/modcmd/init.go3
3 files changed, 3 insertions, 7 deletions
diff --git a/doc/go1.22.html b/doc/go1.22.html
index 437e86e6b6..3bc0c092ed 100644
--- a/doc/go1.22.html
+++ b/doc/go1.22.html
@@ -94,7 +94,9 @@ func main() {
<!-- CL 518776 -->
<p>
- <!-- cmd/go: remove conversion of legacy pre-module dependency configs -->
+ <code>go</code> <code>mod</code> <code>init</code> no longer attempts to import
+ module requirements from configuration files for other vendoring tools
+ (such as <code>Gopkg.lock</code>).
</p>
<!-- CL 495447 -->
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index a40d0556ff..e61e865c84 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -1324,9 +1324,6 @@
// using import comments in .go files, vendoring tool configuration files (like
// Gopkg.lock), and the current directory (if in GOPATH).
//
-// If a configuration file for a vendoring tool is present, init will attempt to
-// import module requirements from it.
-//
// See https://golang.org/ref/mod#go-mod-init for more about 'go mod init'.
//
// # Add missing and remove unused modules
diff --git a/src/cmd/go/internal/modcmd/init.go b/src/cmd/go/internal/modcmd/init.go
index e4be73fab0..facdaa9911 100644
--- a/src/cmd/go/internal/modcmd/init.go
+++ b/src/cmd/go/internal/modcmd/init.go
@@ -25,9 +25,6 @@ module path argument is omitted, init will attempt to infer the module path
using import comments in .go files, vendoring tool configuration files (like
Gopkg.lock), and the current directory (if in GOPATH).
-If a configuration file for a vendoring tool is present, init will attempt to
-import module requirements from it.
-
See https://golang.org/ref/mod#go-mod-init for more about 'go mod init'.
`,
Run: runInit,