Skip to content

proposal: x/tools/go/packages: add Package.{IsNormal,IsTest,IsExternalTest} bool fields #61250

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

Closed
willfaught opened this issue Jul 9, 2023 · 1 comment

Comments

@willfaught
Copy link
Contributor

packages.Load returns a slice of packages.Package, so if you want to single out one of these types of package, you have to iterate through all of them and look for signs that signal one type or another, basically the presence of a _test suffix in the package name and the presence of _test.go files. It would be nice for Load to have a way to explicitly tell you what sort of package it is.

Alternatively, add some kind of type enum field with normal, test, and external test values.

@gopherbot gopherbot added this to the Proposal milestone Jul 9, 2023
@seankhliao
Copy link
Member

Duplicate of #27910

@seankhliao seankhliao marked this as a duplicate of #27910 Jul 9, 2023
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jul 9, 2023
@golang golang locked and limited conversation to collaborators Jul 8, 2024
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