internal/frontend: default to module tab if package is not redistributable
Fixes b/135532361
@@ -96,8 +96,12 @@ func (s *Server) handleDetails(w http.ResponseWriter, r *http.Request) {
tab := r.FormValue("tab")
settings, ok := tabLookup[tab]
if !ok {
+ if pkg.IsRedistributable() {
tab = "doc"
- settings = tabLookup["doc"]
+ } else {
+ tab = "module"
+ }
+ settings = tabLookup[tab]
}
canShowDetails := pkg.IsRedistributable() || settings.AlwaysShowDetails
