-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Description
The current search functionality works on packages alone. That's fine, and useful - but quite limited in the module world.
For example, when I visit https://pkg.go.dev/search?q=sh, I'd expect to see https://pkg.go.dev/mod/mvdan.cc/sh/v3. Particularly since the query string is an exact match with the basename of the module path.
However, because it happens to not be a Go package, it doesn't show up at all as neither a module nor a package. A few sub-packages show up later, but they are scattered, and aren't nearly as useful.
I see two ways this could be addressed:
- Make the search work for both packages and modues, allowing to trim it down with selectors like
is:module. Think like GitHub search, where you can search for both issues and PRs at once, but then trim it down viais:issue. - Keep the search as it is now, but also add a "module search" page.
I think 1 is far better, since most people will just use the default search page, leaving out many of their potentially useful results hidden away.