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

go/types: update docs for modules #43293

Closed
zombiezen opened this issue Dec 20, 2020 · 2 comments
Closed

go/types: update docs for modules #43293

zombiezen opened this issue Dec 20, 2020 · 2 comments

Comments

@zombiezen
Copy link
Contributor

@zombiezen zombiezen commented Dec 20, 2020

What did you do?

@natefinch tried to use go/types (tweet): https://play.golang.org/p/Ue77cJ9Dc3A

What did you expect to see?

A recommendation to use golang.org/x/tools/go/packages.

What did you see instead?

No such mention. The gotypes tutorial is also out-of-date and mentions golang.org/x/tools/go/loader. The golang.org/x/tools/go/loader package does contain a deprecation notice and recommends golang.org/x/tools/go/packages, which is good. I would posit that almost anybody wanting to use go/types should be using golang.org/x/tools/go/packages, so surfacing that recommendation earlier would be better.


I'm happy to send a CL for go/types package doc if there's agreement. I don't have bandwidth to take on improving the gotypes tutorial.

@natefinch
Copy link
Contributor

@natefinch natefinch commented Dec 20, 2020

I actually filed a bug for this :)

#43170

Loading

@zombiezen
Copy link
Contributor Author

@zombiezen zombiezen commented Dec 20, 2020

Whoops! Closing as dupe.

Loading

@zombiezen zombiezen closed this Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants