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

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

I actually filed a bug for this :)

#43170

@zombiezen
Copy link
Contributor Author

Whoops! Closing as dupe.

@golang golang locked and limited conversation to collaborators Dec 20, 2021
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