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.
Reviewed-by: Russ Cox <firstname.lastname@example.org>