It looks like "go doc ./package" scans GOPATH inspecting every file looking for a directory that ends with "./package". There is no such directory of course. This takes lots of time (minutes) with GOPATH that has lots of files.
"./package" is probably not the correct package specification for "go doc" but still something that users might try to execute. It would be good to fail early in this case rather then making a user wait for a long time.
The text was updated successfully, but these errors were encountered:
An error in string slice offsets caused the loop to run forever if the
first character in the argument was a period.
Fixes#10833.
Change-Id: Iefb6aac5cff8864fe93d08e2600cb07d82c6f6df
Reviewed-on: https://go-review.googlesource.com/10285
Reviewed-by: Russ Cox <rsc@golang.org>
It looks like "go doc ./package" scans GOPATH inspecting every file looking for a directory that ends with "./package". There is no such directory of course. This takes lots of time (minutes) with GOPATH that has lots of files.
"./package" is probably not the correct package specification for "go doc" but still something that users might try to execute. It would be good to fail early in this case rather then making a user wait for a long time.
The text was updated successfully, but these errors were encountered: