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/pkgsite: report whether a subpackage is a command #68939

Open
avamsi opened this issue Aug 19, 2024 · 4 comments
Open

x/pkgsite: report whether a subpackage is a command #68939

avamsi opened this issue Aug 19, 2024 · 4 comments
Labels
FeatureRequest FixPending Issues that have a fix which has not yet been reviewed or submitted. pkgsite

Comments

@avamsi
Copy link

avamsi commented Aug 19, 2024

What is the URL of the page with the issue?

https://pkg.go.dev/golang.org/x/perf, for example.

Screenshot

image

What did you expect to see?

Subpackage that are commands are reported as such with a command chip (similar to search results / package page).

What did you see instead?

Only modules are reported with a module chip.


I'm working on https://github.com/avamsi/gobin and would love this information! :)
I currently don't process the subpackages (well, other than those that are inlined in the search results) but would love to, and if I'm not wrong, the only way to do this today is to hit the package pages for all the subpackages.

@gopherbot gopherbot added this to the Unreleased milestone Aug 19, 2024
@seankhliao
Copy link
Member

I think this falls under #36785 since it isn't intended for the page to be scraped.

@avamsi
Copy link
Author

avamsi commented Aug 19, 2024

This will arguably help humans in disambiguating packages as well (consider golang.org/x/perf/benchstat vs golang.org/x/perf/cmd/benchstat from above, for example -- although I guess cmd/ is hint enough here).

FWIW, I was going through the code and this might be as simple as adding a new IsCommand field with pm.Name == "main" here (and using it here to render the command chip)?

@ansaba
Copy link

ansaba commented Aug 22, 2024

cc: @jba

@hyangah hyangah modified the milestones: Unreleased, pkgsite/unplanned Oct 3, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/620739 mentions this issue: internal/frontend: report whether subdirectories are commands

@dmitshur dmitshur added the FixPending Issues that have a fix which has not yet been reviewed or submitted. label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest FixPending Issues that have a fix which has not yet been reviewed or submitted. pkgsite
Projects
None yet
Development

No branches or pull requests

6 participants