internal/frontend: change "other modules" search text for stdlib
Change the text for "other modules" to reflect that stdlib packages
are grouped by top-level directory and not module.
Change-Id: I5a7a6545acb34bc1b22210746af3536b96f2eb14
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/347399
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
diff --git a/internal/frontend/search.go b/internal/frontend/search.go
index d70ec24..81f3b68 100644
--- a/internal/frontend/search.go
+++ b/internal/frontend/search.go
@@ -95,9 +95,9 @@
chipText = "command"
name = effectiveName(r.PackagePath, r.Name)
}
- moduleDesc := "module " + r.ModulePath
+ moduleDesc := "Other packages in module " + r.ModulePath
if r.ModulePath == stdlib.ModulePath {
- moduleDesc = "the standard library"
+ moduleDesc = "Related packages in the standard library"
chipText = "standard library"
}
sr := &SearchResult{
@@ -110,7 +110,7 @@
Licenses: r.Licenses,
CommitTime: elapsedTime(r.CommitTime),
NumImportedBy: int(r.NumImportedBy),
- SameModule: packagePaths("Other packages in "+moduleDesc+":", r.SameModule),
+ SameModule: packagePaths(moduleDesc+":", r.SameModule),
// Say "other" instead of "lower" because at some point we may
// prefer to show a tagged, lower major version over an untagged
// higher major version.