]> Cypherpunks repositories - gostls13.git/commit
"godoc -src pkg_name" excludes duplicates entries
authorAndrei Vieru <euvieru@gmail.com>
Thu, 15 Apr 2010 16:50:37 +0000 (09:50 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 15 Apr 2010 16:50:37 +0000 (09:50 -0700)
commitfffac8072e1854e73ad72c8aa39c20bbdabcfc3d
treedcdc17968de5ccd38c30ae48ee6cdc3ee4a80edd
parentdf3a5440854442ed28e8b9abf651a38ee36b3591
"godoc -src pkg_name" excludes duplicates entries

$ godoc xml | grep Copy\(\)
func (c CharData) Copy() CharData
func (c Comment) Copy() Comment
func (d Directive) Copy() Directive
func (p ProcInst) Copy() ProcInst
func (e StartElement) Copy() StartElement
--------------------------------------------
$ godoc -src xml | grep Copy\(\)
func (c CharData) Copy() CharData
--------------------------------------------
$ godoc -src xml Copy
func (c CharData) Copy() CharData { return CharData(makeCopy(c)) }
--------------------------------------------
The command "godoc -src pkg_name" should output the interface of the named package, but it excludes all duplicate entries. Also the command "godoc -src pkg_name method_name" will output the source code only for one method even if there are more of them with the same name in the same package. This patch set fixes this issue.

R=gri
CC=golang-dev
https://golang.org/cl/883051
src/cmd/godoc/godoc.go
src/pkg/go/ast/filter.go