$ go doc u
package u // import "t/u"
type U struct { ... }
$ go doc u U
What did you expect to see?
$ go doc u U
type U struct{}
func (u *U) M()
What did you see instead?
$ go doc u U
doc: cannot find package "u" in any of:
/usr/local/Cellar/go/1.7.4_2/libexec/src/u (from $GOROOT)
/Users/will.faught/Developer/go/src/u (from $GOPATH)
exit status 1
The text was updated successfully, but these errors were encountered:
In the function parseArgs we spend a lot of effort to find the right thing for go doc with one argument, but we spend no effort for two arguments.
willfaught
changed the title
godoc: nearest-match package resolution not performed for type queries
cmd/doc: nearest-match package resolution not performed for type queries
Jan 18, 2017
gopherbot
removed
the
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
label
Jun 29, 2017
Edited the description to correct the file path to be $GOPATH/src/t/u/u.go instead of $GOPATH/src/t/u.go (consistent with the package u // import "t/u" part).
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.7.4 darwin/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
File
$GOPATH/src/t/u/u.go
:What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: