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/go: doc returns wrong error message about missing package, where just the function name is wrong. #21176

Closed
ikrabbe opened this issue Jul 26, 2017 · 2 comments

Comments

@ikrabbe
Copy link
Contributor

ikrabbe commented Jul 26, 2017

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version devel +df91b8044d Tue Jul 25 20:31:25 2017 +0000 linux/amd64

What operating system and processor architecture are you using (go env)?

linux-amd64

What did you do?

go doc github.com/aws/aws-sdk-go/service/opsworks SomeTypo
doc: cannot find package "github.com/aws/aws-sdk-go/services/opsworks" in any of:
/home/ingo/src/go.local/src/github.com/aws/aws-sdk-go/services/opsworks (from $GOROOT)
/home/ingo/go/src/github.com/aws/aws-sdk-go/services/opsworks (from $GOPATH)

What did you expect to see?

doc: package "github.com/aws/aws-sdk-go/services/opsworks" does not contain a symbol named "SomeTypo".

What did you see instead?

The error statement is just wrong, because actually there is such a package in my environment.
Such error statements make fixing local installations confusing and time consuming.

@ALTree
Copy link
Member

ALTree commented Jul 26, 2017

I can't reproduce this with go1.8.3 or go tip.

$ go get github.com/aws/aws-sdk-go
$ go doc github.com/aws/aws-sdk-go/service/opsworks SomeTypo
doc: no symbol SomeTypo in package github.com/aws/aws-sdk-go/service/opswork

There must be something wrong with your environment.

Also you wrote (in What did you do?) that you run

go doc github.com/aws/aws-sdk-go/service/opsworks SomeTypo

but then why the error message you posted says:

doc: cannot find package "github.com/aws/aws-sdk-go/services/opsworks

with "services" with an "s" ? While in the command you pasted is /service/ with no "s"?

@ALTree ALTree changed the title go doc returns wrong error message about missing package, where just the function name is wrong. cmd/go: doc returns wrong error message about missing package, where just the function name is wrong. Jul 26, 2017
@ikrabbe
Copy link
Contributor Author

ikrabbe commented Jul 26, 2017

sorry, you are right, I was wrong.

@ikrabbe ikrabbe closed this as completed Jul 26, 2017
@golang golang locked and limited conversation to collaborators Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants