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 Tools
Milestone

Comments

@nnathan
Copy link

@nnathan 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 label Oct 21, 2019
@agnivade agnivade added Documentation help wanted NeedsFix labels Oct 21, 2019
@rhnvrm
Copy link
Contributor

@rhnvrm rhnvrm commented Oct 23, 2019

I can take up this issue 👍

@gopherbot
Copy link

@gopherbot gopherbot commented Oct 23, 2019

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

@nnathan
Copy link
Author

@nnathan nnathan commented Oct 23, 2019

You da man Rohan.

@rhnvrm
Copy link
Contributor

@rhnvrm 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 Tools
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants