]> Cypherpunks repositories - gostls13.git/commit
cmd/godoc: fix directory read
authorRuss Cox <rsc@golang.org>
Mon, 12 Mar 2012 17:10:37 +0000 (13:10 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 12 Mar 2012 17:10:37 +0000 (13:10 -0400)
commitda8efae9fe6a3d5f5e6dffc2c70c835fa6724cbb
treed4aa47aaf8b05d784f5ecb2abfeda00697ec2d9c
parent376fc748f6dfbe7ad12fc97d0bf8b2385c9314d7
cmd/godoc: fix directory read

Undo CL 5783076 and apply correct fix.

The /doc hack is wrong.  The code to handle this case was
already there and just needs a simple fix:

  // We didn't find any directories containing Go files.
  // If some directory returned successfully, use that.
- if len(all) == 0 && first != nil {
+ if !haveGo {
  for _, d := range first {
  haveName[d.Name()] = true
  all = append(all, d)

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5783079
src/cmd/godoc/filesystem.go