summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoi Martin <jroi.martin@gmail.com>2021-11-30 19:35:47 +0100
committerBryan Mills <bcmills@google.com>2021-12-06 19:10:14 +0000
commit7a840664fe9d8d4c11b943dba77c513dba5207a1 (patch)
tree98587ace87092631a9c6d26fcb4a12d331665ee0
parent2cb9042dc2d5fdf6013305a077d013dbbfbaac06 (diff)
downloadgo-git-7a840664fe9d8d4c11b943dba77c513dba5207a1.tar.gz
cmd/go: update "go help doc" docs
This CL updates "go help doc" docs so they reflect the following changes: - CL 59413 modified "go doc", so the behavior of the two-args case is consistent with the one-arg one. - CL 141397 removed godoc's command-line interface in favor of "go doc". Fixes #49830. Change-Id: I0923634291d34ae663fe2944d69757462b814919 Reviewed-on: https://go-review.googlesource.com/c/go/+/367497 Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Trust: Russ Cox <rsc@golang.org>
-rw-r--r--src/cmd/go/alldocs.go5
-rw-r--r--src/cmd/go/internal/doc/doc.go5
2 files changed, 4 insertions, 6 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index 12b64d309c..b9fca791be 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -368,9 +368,8 @@
// path. The go tool's usual package mechanism does not apply: package path
// elements like . and ... are not implemented by go doc.
//
-// When run with two arguments, the first must be a full package path (not just a
-// suffix), and the second is a symbol, or symbol with method or struct field.
-// This is similar to the syntax accepted by godoc:
+// When run with two arguments, the first is a package path (full path or suffix),
+// and the second is a symbol, or symbol with method or struct field:
//
// go doc <pkg> <sym>[.<methodOrField>]
//
diff --git a/src/cmd/go/internal/doc/doc.go b/src/cmd/go/internal/doc/doc.go
index 8580a5dc4d..7741a9022c 100644
--- a/src/cmd/go/internal/doc/doc.go
+++ b/src/cmd/go/internal/doc/doc.go
@@ -60,9 +60,8 @@ The package path must be either a qualified path or a proper suffix of a
path. The go tool's usual package mechanism does not apply: package path
elements like . and ... are not implemented by go doc.
-When run with two arguments, the first must be a full package path (not just a
-suffix), and the second is a symbol, or symbol with method or struct field.
-This is similar to the syntax accepted by godoc:
+When run with two arguments, the first is a package path (full path or suffix),
+and the second is a symbol, or symbol with method or struct field:
go doc <pkg> <sym>[.<methodOrField>]