Open avamsi opened 3 weeks ago
pkgsite implementation currently looks up the package using the "main" page (like https://pkg.go.dev/golang.org/x/perf/cmd/benchstat) but perhaps "imports" page is better (https://pkg.go.dev/golang.org/x/perf/cmd/benchstat?tab=imports) given it's lighter.
Also, UnitHeader-breadcrumbCurrent
is better for pulling the version -- it's not truncated and available on all the pages.
deps.dev is unable to directly answer about packages within a top level module (for example, https://api.deps.dev/v3/systems/go/packages/golang.org%2Fx%2Fperf%2Fcmd%2Fbenchstat does not work but https://api.deps.dev/v3/systems/go/packages/golang.org%2Fx%2Fperf does). One obvious solution is to lookup parent package till we get a hit but of course, we'd be paying for that in latency (3x in this case).
proxy.golang.org has the same problem (https://proxy.golang.org/golang.org/x/perf/cmd/benchstat/@latest and https://proxy.golang.org/golang.org/x/perf/@latest) but seems slightly faster -- it could be worth adding this as a repo, even if it doesn't support search.
pkg.go.dev does not have this problem but can at times return truncated versions and is slower in general.