From 43afb1a22016ec537915ed8ade0039ad8c6559ce Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sun, 28 Mar 2021 23:04:33 +0700 Subject: [PATCH] cmd/go: fix documentation on how to create new go.mod file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The correct command to create new go.mod file should be 'go mod init', not 'go help init'. Change-Id: I1150621987d989997f8b75e6a13fe96423a11cf3 Reviewed-on: https://go-review.googlesource.com/c/go/+/305289 Reviewed-by: Jay Conrod Reviewed-by: Daniel Martí Trust: Jay Conrod Trust: Daniel Martí Run-TryBot: Jay Conrod TryBot-Result: Go Bot --- src/cmd/go/alldocs.go | 2 +- src/cmd/go/internal/modload/help.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index b15b77fac8..3fece365e8 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -1952,7 +1952,7 @@ // The go.mod file format is described in detail at // https://golang.org/ref/mod#go-mod-file. // -// To create a new go.mod file, use 'go help init'. For details see +// To create a new go.mod file, use 'go mod init'. For details see // 'go help mod init' or https://golang.org/ref/mod#go-mod-init. // // To add missing module requirements or remove unneeded requirements, diff --git a/src/cmd/go/internal/modload/help.go b/src/cmd/go/internal/modload/help.go index fd39ddd94e..886ad62bd9 100644 --- a/src/cmd/go/internal/modload/help.go +++ b/src/cmd/go/internal/modload/help.go @@ -46,7 +46,7 @@ marking the root of the main (current) module. The go.mod file format is described in detail at https://golang.org/ref/mod#go-mod-file. -To create a new go.mod file, use 'go help init'. For details see +To create a new go.mod file, use 'go mod init'. For details see 'go help mod init' or https://golang.org/ref/mod#go-mod-init. To add missing module requirements or remove unneeded requirements,