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

x/tools/go/analysis/passes/inspect: package godoc example incorrect #35028

Closed
nnathan opened this issue Oct 21, 2019 · 4 comments
Closed

x/tools/go/analysis/passes/inspect: package godoc example incorrect #35028

nnathan opened this issue Oct 21, 2019 · 4 comments
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@nnathan
Copy link

nnathan commented Oct 21, 2019

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

1.13

Does this issue reproduce with the latest release?

Yes.

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

Doesn't matter.

What did you do?

Apply the example from the inspect godoc.

See this playground example demonstrating the compile error.

What did you expect to see?

Not a compile error.

This specific line in the godoc for inspect.go (https://github.com/golang/tools/blob/master/go/analysis/passes/inspect/inspect.go#L19) should say:

Requires:       []*analysis.Analyzer{inspect.Analyzer},

Which can be verified in this playground example.

What did you see instead?

N/A.

@gopherbot gopherbot added this to the Unreleased milestone Oct 21, 2019
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Oct 21, 2019
@agnivade agnivade added Documentation help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Oct 21, 2019
@rhnvrm
Copy link
Contributor

rhnvrm commented Oct 23, 2019

I can take up this issue 👍

@gopherbot
Copy link

Change https://golang.org/cl/202817 mentions this issue: fix: incorrect example for analysis/passes/inspect

@nnathan
Copy link
Author

nnathan commented Oct 23, 2019

You da man Rohan.

@rhnvrm
Copy link
Contributor

rhnvrm commented Oct 23, 2019

@nnathan :)

@golang golang locked and limited conversation to collaborators Oct 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants