internal/frontend: remove unnecessary version filtering
As the TODO mentions, it is no longer necessary to filter versions
in fetchPackageVersionsDetails.
Change-Id: Ia5e7edbe3d229dc6b14c63c93a08be548a1b513e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/238578
Reviewed-by: Robert Findley <rfindley@google.com>
diff --git a/internal/frontend/versions.go b/internal/frontend/versions.go
index 3ee148a..15575bb 100644
--- a/internal/frontend/versions.go
+++ b/internal/frontend/versions.go
@@ -98,17 +98,6 @@
}
}
- var filteredVersions []*internal.ModuleInfo
- // TODO(rfindley): remove this filtering, as it should not be necessary and
- // is probably a relic of earlier version query implementations.
- for _, v := range versions {
- if seriesPath := v.SeriesPath(); strings.HasPrefix(v1Path, seriesPath) || seriesPath == stdlib.ModulePath {
- filteredVersions = append(filteredVersions, v)
- } else {
- log.Errorf(ctx, "got version with mismatching series: %q", seriesPath)
- }
- }
-
linkify := func(mi *internal.ModuleInfo) string {
// Here we have only version information, but need to construct the full
// import path of the package corresponding to this version.
@@ -120,7 +109,7 @@
}
return constructPackageURL(versionPath, mi.ModulePath, linkVersion(mi.Version, mi.ModulePath))
}
- return buildVersionDetails(modulePath, filteredVersions, linkify), nil
+ return buildVersionDetails(modulePath, versions, linkify), nil
}
// pathInVersion constructs the full import path of the package corresponding