]> Cypherpunks repositories - gostls13.git/commit
cmd/doc: search the tree in breadth-first order
authorRob Pike <r@golang.org>
Wed, 9 Dec 2015 22:39:26 +0000 (14:39 -0800)
committerRob Pike <r@golang.org>
Thu, 10 Dec 2015 18:08:16 +0000 (18:08 +0000)
commit2aa5874490495108f9467a8613868b21872066bf
tree25909c564e494d77a7a493a8dfd5828e2b3852f4
parent732e2cd7461107b314ba23da10ca1e24a22885d2
cmd/doc: search the tree in breadth-first order

This is a simple change to the command that should resolve problems like finding
vendored packages before their non-vendored siblings. By searching in breadth-first
order, we find the matching package lowest in the hierarchy, which is more likely
to be correct than the deeper one, such as a vendored package, that will be found
in a depth-first scan.

This may be sufficient to resolve the issue, and has the merit that it is very easy
to explain. I will leave the issue open for now in case my intuition is wrong.

Update #12423

Change-Id: Icf69e8beb1845277203fcb7d19ffb7cca9fa41f5
Reviewed-on: https://go-review.googlesource.com/17691
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/doc/dirs.go
src/cmd/go/alldocs.go
src/cmd/go/doc.go