• Rob Pike's avatar
    cmd/doc: add -all flag to print all documentation for package · 101a677e
    Rob Pike authored
    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: 's avatarRuss Cox <rsc@golang.org>
    101a677e
main.go 11.7 KB