1
0
mirror of https://github.com/golang/go synced 2024-10-06 07:21:22 -06:00
go/src/cmd/doc
Rob Pike 9de28cf547 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>
2015-05-06 16:13:47 +00:00
..
main.go cmd/doc: show the true import path rather than "." 2015-04-29 23:01:37 +00:00
pkg.go cmd/doc: if no top-level symbols match, look for methods 2015-05-06 16:13:47 +00:00