Mention -modfile, -C, -overlay, and -modcacherw in the 'go tool'
documentation. We let a reference to 'go help build' give a pointer to
more detailed information.
The -modfile flag in particular is newly useful with the Go 1.24 support
for user-defined tools with 'go tool'.
Updates #48429
Updates #33926
Updates #71663
Fixes #71502
Change-Id: Ida67df50ff774a0886733d661a40e27c2cadc0f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/648577
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Conrad Irwin <conrad.irwin@gmail.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
Auto-Submit: Sam Thanawalla <samthanawalla@google.com>
// The -n flag causes tool to print the command that would be
// executed but not execute it.
//
+// The -modfile=file.mod build flag causes tool to use an alternate file
+// instead of the go.mod in the module root directory.
+//
+// Tool also provides the -C, -overlay, and -modcacherw build flags.
+//
+// For more about build flags, see 'go help build'.
+//
// For more about each builtin tool command, see 'go doc cmd/<command>'.
//
// # Print Go version
The -n flag causes tool to print the command that would be
executed but not execute it.
+The -modfile=file.mod build flag causes tool to use an alternate file
+instead of the go.mod in the module root directory.
+
+Tool also provides the -C, -overlay, and -modcacherw build flags.
+
+For more about build flags, see 'go help build'.
+
For more about each builtin tool command, see 'go doc cmd/<command>'.
`,
}