• Russ Cox's avatar
    cmd/godoc: fix directory read · da8efae9
    Russ Cox authored
    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
    da8efae9
filesystem.go 15.8 KB