Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/doc: running "go doc ./package" can take very long time #10883

kostya-sh opened this issue May 17, 2015 · 1 comment

cmd/doc: running "go doc ./package" can take very long time #10883

kostya-sh opened this issue May 17, 2015 · 1 comment


Copy link

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.

@robpike robpike self-assigned this May 20, 2015
kostya-sh referenced this issue May 22, 2015
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-by: Russ Cox <>
Copy link

Fixed by CL 10285.

@mikioh mikioh added this to the Go1.5 milestone May 23, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
@rsc rsc unassigned robpike Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

5 participants