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/example: replace references to x/tools/go/loader with x/tools/go/packages #60593

Closed
adonovan opened this issue Jun 4, 2023 · 1 comment
Closed
Assignees
Labels
Analysis Issues related to static analysis (vet, x/tools/go/analysis) Documentation
Milestone

Comments

@adonovan
Copy link
Member

adonovan commented Jun 4, 2023

The go/types tutorial at https://github.com/golang/example/tree/master/gotypes uses the old loader package in many examples. That package cannot handle modules correctly and is deprecated; all users should use go/packages instead. Let's update the doc to avoid steering people in the wrong direction.

See also #35872

@adonovan adonovan self-assigned this Jun 4, 2023
@gopherbot gopherbot added this to the Unreleased milestone Jun 4, 2023
@adonovan adonovan added Documentation Analysis Issues related to static analysis (vet, x/tools/go/analysis) labels Jun 4, 2023
@gopherbot
Copy link

Change https://go.dev/cl/534695 mentions this issue: gotypes: stop directing people to golang.org/x/tools/go/loader

david-t3 added a commit to david-t3/go-sample that referenced this issue Apr 19, 2024
It is very obsolete. Use go/packages instead.

Also, add a go generate command to weave the README.

Fixes golang/go#60593

Change-Id: Ifaf3ffa588dc3e65fb1e96b39b249a9084d66451
Reviewed-on: https://go-review.googlesource.com/c/example/+/534695
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Commit-Queue: Alan Donovan <adonovan@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Analysis Issues related to static analysis (vet, x/tools/go/analysis) Documentation
Projects
None yet
Development

No branches or pull requests

2 participants