]> Cypherpunks repositories - gostls13.git/commit
cmd/doc: add -all flag to print all documentation for package
authorRob Pike <r@golang.org>
Sat, 13 Oct 2018 10:06:43 +0000 (21:06 +1100)
committerRob Pike <r@golang.org>
Wed, 17 Oct 2018 08:36:13 +0000 (08:36 +0000)
commit101a677ebf87f6ed0ed877533c54c7270edadc20
tree2f6b990e90a36c5386bb7eb39352218a8a8b8d88
parentee76992200a282f0ed4eb52e686ec254d8313cdc
cmd/doc: add -all flag to print all documentation for package

Unlike the one for the old godoc, you need the -u flag to see
unexported symbols. This seems like the right behavior: it's
consistent.

For now at least, the argument must be a package, not a symbol.
This is also different from old godoc.

Required a little refactoring but also cleaned up a few things.

Update #25595

Leaving the bug open for now until we tackle
go doc -all symbol

Change-Id: Ibc1975bfa592cb1e92513eb2e5e9e11e01a60095
Reviewed-on: https://go-review.googlesource.com/c/141977
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/doc/doc_test.go
src/cmd/doc/main.go
src/cmd/doc/pkg.go
src/cmd/go/alldocs.go
src/cmd/go/internal/doc/doc.go