Skip to content

x/pkgsite: provide options for sorting search results by number of imports and stars on GitHub #36952

@thejerf

Description

@thejerf

As requested on https://blog.golang.org/pkg.go.dev-2020: I have found godoc.org to be the best way to search for quality Go modules, significantly because it defaults to sorting by the number of imports (possibly informed by the number of stars).

Compare: https://pkg.go.dev/search?q=smtp

To: https://godoc.org/?q=smtp

Observe, for instance, that on godoc.org, Brad Fitz's smtpd server comes up early, whereas on pkg.go.dev the front page has several packages of much less importance, and smtpd shows up on page 17 after a lot of inner modules and minor forks and larger projects that just happen to have an "smtp" package. Prioritizing hits at the "top level" of the package is probably a good idea, too; github.com/blah/smtpd is much more likely to be what I'm looking for than github.com/blah/project/go/inner1/inner2/smtp.

I also routinely suggest this to newcomers as a way of locating modules for Go.

Metadata

Metadata

Assignees

Labels

NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.pkgsitepkgsite/searchIssues related to pkg.go.dev search functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions