cmd/go/internal/modcmd: remove documentation for auto-converting legacy formats

CL 518776 dropped the ability of 'go mod init' to convert
legacy pre-module dependency configuration files, such as automatically
transforming a Gopkg.lock to a go.mod file with similar requirements,
but some of the documentation remained.

In this CL, we remove it from the cmd/go documentation.
(CL 662675 is a companion change that removes it from the Modules
Reference page).

Updates #71537

Change-Id: Ieccc64c811c4c25a657c00e42f7362a32b5fd661
Reviewed-on: https://go-review.googlesource.com/c/go/+/662695
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Sean Liao <sean@liao.dev>
Auto-Submit: Sean Liao <sean@liao.dev>
This commit is contained in:
thepudds 2025-04-03 12:01:16 -04:00 committed by Gopher Robot
parent cfb78d63bd
commit 4820816b0d
3 changed files with 3 additions and 7 deletions

View File

@ -1358,8 +1358,7 @@
//
// Init accepts one optional argument, the module path for the new module. If the
// 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).
// using import comments in .go files and the current directory (if in GOPATH).
//
// See https://golang.org/ref/mod#go-mod-init for more about 'go mod init'.
//

View File

@ -22,8 +22,7 @@ must not already exist.
Init accepts one optional argument, the module path for the new module. If the
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).
using import comments in .go files and the current directory (if in GOPATH).
See https://golang.org/ref/mod#go-mod-init for more about 'go mod init'.
`,

View File

@ -110,9 +110,7 @@ type RevInfo struct {
// introduced, if a path p resolves using the pre-module "go get" lookup
// to the root of a source code repository without a go.mod file,
// that repository is treated as if it had a go.mod in its root directory
// declaring module path p. (The go.mod is further considered to
// contain requirements corresponding to any legacy version
// tracking format such as Gopkg.lock, vendor/vendor.conf, and so on.)
// declaring module path p.
//
// The presentation so far ignores the fact that a source code repository
// has many different versions of a file tree, and those versions may