internal: remove repetitive words
Change-Id: Ie5a688c08ba46018f0fa8f5a1af495e9c29fd684
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/509695
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
diff --git a/internal/database/reflect.go b/internal/database/reflect.go
index 1d52438..5355792 100644
--- a/internal/database/reflect.go
+++ b/internal/database/reflect.go
@@ -83,7 +83,7 @@
}
// NullPtr is for scanning nullable database columns into pointer variables or
-// fields. When given a pointer to to a pointer to some type T, it returns a
+// fields. When given a pointer to a pointer to some type T, it returns a
// value that can be passed to a Scan function. If the corresponding column is
// nil, the variable will be set to nil. Otherwise, it will be set to a newly
// allocated pointer to the column value.
diff --git a/internal/frontend/header.go b/internal/frontend/header.go
index b2fc031..4e345f8 100644
--- a/internal/frontend/header.go
+++ b/internal/frontend/header.go
@@ -96,7 +96,7 @@
return base
}
-// absoluteTime takes a date and returns returns a human-readable,
+// absoluteTime takes a date and returns a human-readable,
// date with the format mmm d, yyyy.
func absoluteTime(date time.Time) string {
if date.IsZero() {
diff --git a/internal/frontend/paginate.go b/internal/frontend/paginate.go
index 4379c19..919da92 100644
--- a/internal/frontend/paginate.go
+++ b/internal/frontend/paginate.go
@@ -159,7 +159,7 @@
return page - 1
}
-// next returns the number of the page after the given page, or zero if page is is the last page or larger.
+// next returns the number of the page after the given page, or zero if page is the last page or larger.
// limit and totalCount are used to calculate the last page (see numPages).
func next(page, limit, totalCount int) int {
if page >= numPages(limit, totalCount) {
diff --git a/internal/frontend/search.go b/internal/frontend/search.go
index 28f168b..2ff7833 100644
--- a/internal/frontend/search.go
+++ b/internal/frontend/search.go
@@ -540,7 +540,7 @@
return unicode.IsUpper(rune(s[0]))
}
-// elapsedTime takes a date and returns returns human-readable,
+// elapsedTime takes a date and returns human-readable,
// relative timestamps based on the following rules:
// (1) 'X hours ago' when X < 6
// (2) 'today' between 6 hours and 1 day ago
diff --git a/internal/middleware/caching.go b/internal/middleware/caching.go
index b8f75bc..4ef5e87 100644
--- a/internal/middleware/caching.go
+++ b/internal/middleware/caching.go
@@ -37,7 +37,7 @@
)
cacheLatency = stats.Float64(
"go-discovery/cache/result_latency",
- "Cache serving latency latency",
+ "Cache serving latency",
stats.UnitMilliseconds,
)
cacheErrors = stats.Int64(
diff --git a/internal/postgres/search.go b/internal/postgres/search.go
index 5e01323..e1a7fad 100644
--- a/internal/postgres/search.go
+++ b/internal/postgres/search.go
@@ -75,7 +75,7 @@
type searchEvent struct {
// Type is either the searcher name or 'estimate' (the count estimate).
Type string
- // Latency is the duration that that the operation took.
+ // Latency is the duration that the operation took.
Latency time.Duration
// Err is the error returned by the operation, if any.
Err error
diff --git a/internal/postgres/symbolsearch.go b/internal/postgres/symbolsearch.go
index 478a3ab..a89118a 100644
--- a/internal/postgres/symbolsearch.go
+++ b/internal/postgres/symbolsearch.go
@@ -229,7 +229,7 @@
if strings.Contains(w, "/") || strings.Contains(w, "-") || commonHostnames[w] {
continue
}
- // A symbolFilter was used, and this word does not match match it, so
+ // A symbolFilter was used, and this word does not match it, so
// it can't be the symbol name.
if symbolFilter != "" && w != symbolFilter {
continue
diff --git a/internal/static/config.go b/internal/static/config.go
index 369a043..087ce46 100644
--- a/internal/static/config.go
+++ b/internal/static/config.go
@@ -5,7 +5,7 @@
package static
type Config struct {
- // Entrypoint is a directory in which to to build TypeScript
+ // Entrypoint is a directory in which to build TypeScript
// sources.
EntryPoint string
diff --git a/internal/stdlib/stdlib.go b/internal/stdlib/stdlib.go
index b11a0a8..d070a28 100644
--- a/internal/stdlib/stdlib.go
+++ b/internal/stdlib/stdlib.go
@@ -388,7 +388,7 @@
// semantic version for the branch.
//
// ContentDir reads the standard library at the Go repository tag corresponding
-// to to the given semantic version.
+// to the given semantic version.
//
// ContentDir ignores go.mod files in the standard library, treating it as if it
// were a single module named "std" at the given version.
diff --git a/internal/symbol/apigodoc.go b/internal/symbol/apigodoc.go
index 094b897..1eb9736 100644
--- a/internal/symbol/apigodoc.go
+++ b/internal/symbol/apigodoc.go
@@ -115,7 +115,7 @@
structName string // for struct fields, the outer struct name
}
-// versionParser parses $GOROOT/api/go*.txt files and stores them in in its rows field.
+// versionParser parses $GOROOT/api/go*.txt files and stores them in its rows field.
type versionParser struct {
res apiVersions // initialized lazily
}
diff --git a/internal/vuln/vulns.go b/internal/vuln/vulns.go
index 38c031f..2ced671 100644
--- a/internal/vuln/vulns.go
+++ b/internal/vuln/vulns.go
@@ -107,7 +107,7 @@
for _, v := range r.Events {
if v.Introduced != "" {
// We expected Introduced and Fixed to alternate, but if
- // p.intro != "", then they they don't.
+ // p.intro != "", then they don't.
// Keep going in that case, ignoring the first Introduced.
p.intro = v.Introduced
if p.intro == "0" {