]> Cypherpunks repositories - gostls13.git/commit
cmd/doc: if no top-level symbols match, look for methods
authorRob Pike <r@golang.org>
Mon, 4 May 2015 17:11:27 +0000 (10:11 -0700)
committerRob Pike <r@golang.org>
Wed, 6 May 2015 16:13:47 +0000 (16:13 +0000)
commit9de28cf5472724b113ed02f03fa7222be4ca0b46
tree521076ab337f742515bc16c86a358dcd9e94d5d9
parent5e80fc640bef471c60df350f709cfc7183a84adc
cmd/doc: if no top-level symbols match, look for methods

Improving the usability further.

Before:

$ go doc bytes.Read
doc: symbol Read not present in package bytes installed in "bytes"
$

After:
$ go doc bytes.Read
func (b *Buffer) Read(p []byte) (n int, err error)
    Read reads the next len(p) bytes from the buffer or until the buffer is drained.
    The return value n is the number of bytes read. If the buffer has no data to
    return, err is io.EOF (unless len(p) is zero); otherwise it is nil.
func (r *Reader) Read(b []byte) (n int, err error)
$

Change-Id: I646511fada138bd09e9b39820da01a5ccef4a90f
Reviewed-on: https://go-review.googlesource.com/9656
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/doc/pkg.go