]> Cypherpunks repositories - gostls13.git/commit
cmd/doc: try better when looking for package dir
authorKonstantin Shaposhnikov <k.shaposhnikov@gmail.com>
Sun, 17 May 2015 04:07:04 +0000 (12:07 +0800)
committerRob Pike <r@golang.org>
Mon, 1 Jun 2015 19:59:40 +0000 (19:59 +0000)
commite15f89c526ec464a78b5e76279090cba785c1326
tree6d38d333aedaef52eaa96a6daaea024a7b1f2f72
parent8801bdf2b3cb8f3d59664f56fba7eeb7a2cf0bdb
cmd/doc: try better when looking for package dir

When go doc is invoked with a single package name argument (e.g. go doc pkgname)
it needs to find the directory of the requested package sources in GOPATH.

GOPATH might contain directories with the same name as the requested package
that do no contain any *.go files. This change makes "go doc" ignore such
directories when looking for possible package directories.

This fixes #10882

Change-Id: Ib3d4ea69a25801c34cbe7b044de9870ba12f9aa8
Reviewed-on: https://go-review.googlesource.com/10190
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/doc/main.go