Closed
Description
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.