aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcuishuang <imcusg@gmail.com>2025-10-21 10:24:51 +0800
committerGopher Robot <gobot@golang.org>2025-10-23 11:45:22 -0700
commit34a1afa34fdbd811526de5926a44fa2a27418a2b (patch)
tree1eb7e53b9be3b5763d5a2abb3be441fc5b66075a
parentfe04cb7342faa5af6b014191b12b56d823382fc7 (diff)
downloadgo-x-pkgsite-34a1afa34fdbd811526de5926a44fa2a27418a2b.tar.xz
all: fix some comments
Change-Id: Ia70b35ab9aef270692a3892629c3c81208771089 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/713360 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Sean Liao <sean@liao.dev> kokoro-CI: kokoro <noreply+kokoro@google.com> Auto-Submit: Sean Liao <sean@liao.dev> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
-rw-r--r--deploy/migrate.yaml2
-rw-r--r--internal/config/config.go2
-rw-r--r--internal/fetch/fetchdata_test.go2
-rw-r--r--internal/frontend/latest_version_test.go2
-rw-r--r--internal/frontend/markdown.go4
-rw-r--r--internal/frontend/search.go2
-rw-r--r--internal/frontend/versions/versions.go2
-rw-r--r--internal/godoc/dochtml/internal/render/synopsis_test.go2
-rw-r--r--internal/proxy/proxytest/module.go2
-rw-r--r--internal/stdlib/testdata/v1.12.5/src/context/context.go6
-rw-r--r--internal/stdlib/testdata/v1.12.5/src/context/context_test.go4
-rw-r--r--internal/stdlib/testdata/v1.12.5/src/context/example_test.go2
-rw-r--r--internal/symbol/stdlib.go2
-rw-r--r--internal/worker/server.go2
-rw-r--r--static/shared/chip/chip.md2
15 files changed, 19 insertions, 19 deletions
diff --git a/deploy/migrate.yaml b/deploy/migrate.yaml
index bc5bc468..babd5f3e 100644
--- a/deploy/migrate.yaml
+++ b/deploy/migrate.yaml
@@ -4,7 +4,7 @@
# Run a migrate command on a database
-# Required substitions
+# Required substitutions
# _ENV environment (dev, staging, or prod)
# _CMD command to migrate
diff --git a/internal/config/config.go b/internal/config/config.go
index 2b8f0458..cc60ec97 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -170,7 +170,7 @@ func (c *Config) DBSecondaryConnInfo() string {
return c.dbConnInfo(c.DBSecondaryHost)
}
-// dbConnInfo returns a PostgresSQL connection string for the given host.
+// dbConnInfo returns a PostgreSQL connection string for the given host.
func (c *Config) dbConnInfo(host string) string {
// For the connection string syntax, see
// https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING.
diff --git a/internal/fetch/fetchdata_test.go b/internal/fetch/fetchdata_test.go
index 307c8492..3585e875 100644
--- a/internal/fetch/fetchdata_test.go
+++ b/internal/fetch/fetchdata_test.go
@@ -1398,7 +1398,7 @@ var moduleStd = &testModule{
{
GOOS: internal.All,
GOARCH: internal.All,
- Synopsis: "Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.",
+ Synopsis: "Package context defines the Context type, which carries deadlines, cancellation signals, and other request-scoped values across API boundaries and between processes.",
API: []*internal.Symbol{
{
SymbolMeta: internal.SymbolMeta{
diff --git a/internal/frontend/latest_version_test.go b/internal/frontend/latest_version_test.go
index be2f2f82..49130a11 100644
--- a/internal/frontend/latest_version_test.go
+++ b/internal/frontend/latest_version_test.go
@@ -54,7 +54,7 @@ func TestLatestMinorVersion(t *testing.T) {
name: "module does not exist",
fullPath: "github.com/mymodule/doesnotexist",
modulePath: internal.UnknownModulePath,
- wantErr: fmt.Errorf("error while retriving minor version"),
+ wantErr: fmt.Errorf("error while retrieving minor version"),
},
}
ctx := context.Background()
diff --git a/internal/frontend/markdown.go b/internal/frontend/markdown.go
index 75953973..6d54c5ed 100644
--- a/internal/frontend/markdown.go
+++ b/internal/frontend/markdown.go
@@ -211,7 +211,7 @@ func (e *extractTOC) extract(doc *markdown.Document) {
}
}
if e.removeTitle {
- // If there is only one top tevel heading with 1 or more children we
+ // If there is only one top level heading with 1 or more children we
// assume it is the title of the document and remove it from the TOC.
if len(nested) == 1 && len(nested[0].Children) > 0 {
nested = nested[0].Children
@@ -359,7 +359,7 @@ func transformHeadingsToHTML(doc *markdown.Document) {
htmltag := &markdown.HTMLBlock{}
var buf bytes.Buffer
// TODO(matloob): Do we want the div and h elements to have analogous classes?
- // Currently we're using newLevel for the div's class but n.Level for the h element's
+ // Currently we're using newLevel for the div's class but heading.Level for the h element's
// class.
if newLevel > 6 {
fmt.Fprintf(&buf, `<div class="h%d" role="heading" aria-level="%d"`, newLevel, heading.Level)
diff --git a/internal/frontend/search.go b/internal/frontend/search.go
index 5db110c7..c4625f67 100644
--- a/internal/frontend/search.go
+++ b/internal/frontend/search.go
@@ -474,7 +474,7 @@ func shouldDefaultToSymbolSearch(q string) bool {
return !internal.TopLevelDomains[parts[len(parts)-1]]
}
// If a user searches for "Unmarshal", assume that they are searching for
- // the symbol name "Unmarshal", not the package unmarshal.
+ // the symbol name "Unmarshal", not a package named "unmarshal".
return isCapitalized(q)
}
diff --git a/internal/frontend/versions/versions.go b/internal/frontend/versions/versions.go
index c60c8e51..2cc83214 100644
--- a/internal/frontend/versions/versions.go
+++ b/internal/frontend/versions/versions.go
@@ -158,7 +158,7 @@ func buildVersionDetails(ctx context.Context, currentModulePath, packagePath str
for _, mi := range modInfos {
// Try to resolve the most appropriate major version for this version. If
// we detect a +incompatible version (when the path version does not match
- // the sematic version), we prefer the path version.
+ // the semantic version), we prefer the path version.
major := semver.Major(mi.Version)
if mi.ModulePath == stdlib.ModulePath {
var err error
diff --git a/internal/godoc/dochtml/internal/render/synopsis_test.go b/internal/godoc/dochtml/internal/render/synopsis_test.go
index cbcd17db..c48ea4c9 100644
--- a/internal/godoc/dochtml/internal/render/synopsis_test.go
+++ b/internal/godoc/dochtml/internal/render/synopsis_test.go
@@ -67,7 +67,7 @@ func TestOneLineNode(t *testing.T) {
)
type Struct struct {
- // Some commment
+ // Some comment
// Another comment.
Field int
diff --git a/internal/proxy/proxytest/module.go b/internal/proxy/proxytest/module.go
index 6b91a31b..7352e613 100644
--- a/internal/proxy/proxytest/module.go
+++ b/internal/proxy/proxytest/module.go
@@ -20,7 +20,7 @@ type Module struct {
}
// Some module proxies incorrectly return a space after the version. Tests may
-// simulate that that behavior by giving m.Version a space suffix. This function
+// simulate that behavior by giving m.Version a space suffix. This function
// will always, however, return the correct form for the version.
func (m *Module) TidyVersion() string {
return strings.TrimSpace(m.Version)
diff --git a/internal/stdlib/testdata/v1.12.5/src/context/context.go b/internal/stdlib/testdata/v1.12.5/src/context/context.go
index 21a40d59..3dcab5a2 100644
--- a/internal/stdlib/testdata/v1.12.5/src/context/context.go
+++ b/internal/stdlib/testdata/v1.12.5/src/context/context.go
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// Package context defines the Context type, which carries deadlines,
-// cancelation signals, and other request-scoped values across API boundaries
+// cancellation signals, and other request-scoped values across API boundaries
// and between processes.
//
// Incoming requests to a server should create a Context, and outgoing
@@ -55,7 +55,7 @@ import (
"time"
)
-// A Context carries a deadline, a cancelation signal, and other values across
+// A Context carries a deadline, a cancellation signal, and other values across
// API boundaries.
//
// Context's methods may be called by multiple goroutines simultaneously.
@@ -93,7 +93,7 @@ type Context interface {
// }
//
// See https://blog.golang.org/pipelines for more examples of how to use
- // a Done channel for cancelation.
+ // a Done channel for cancellation.
Done() <-chan struct{}
// If Done is not yet closed, Err returns nil.
diff --git a/internal/stdlib/testdata/v1.12.5/src/context/context_test.go b/internal/stdlib/testdata/v1.12.5/src/context/context_test.go
index 0b6ca742..23bd715d 100644
--- a/internal/stdlib/testdata/v1.12.5/src/context/context_test.go
+++ b/internal/stdlib/testdata/v1.12.5/src/context/context_test.go
@@ -94,7 +94,7 @@ func XTestWithCancel(t testingT) {
}
cancel()
- time.Sleep(100 * time.Millisecond) // let cancelation propagate
+ time.Sleep(100 * time.Millisecond) // let cancellation propagate
for i, c := range contexts {
select {
@@ -306,7 +306,7 @@ func XTestCanceledTimeout(t testingT) {
o := otherContext{c}
c, cancel := WithTimeout(o, 2*time.Second)
cancel()
- time.Sleep(100 * time.Millisecond) // let cancelation propagate
+ time.Sleep(100 * time.Millisecond) // let cancellation propagate
select {
case <-c.Done():
default:
diff --git a/internal/stdlib/testdata/v1.12.5/src/context/example_test.go b/internal/stdlib/testdata/v1.12.5/src/context/example_test.go
index 2b28b577..b91a8ace 100644
--- a/internal/stdlib/testdata/v1.12.5/src/context/example_test.go
+++ b/internal/stdlib/testdata/v1.12.5/src/context/example_test.go
@@ -59,7 +59,7 @@ func ExampleWithDeadline() {
ctx, cancel := context.WithDeadline(context.Background(), d)
// Even though ctx will be expired, it is good practice to call its
- // cancelation function in any case. Failure to do so may keep the
+ // cancellation function in any case. Failure to do so may keep the
// context and its parent alive longer than necessary.
defer cancel()
diff --git a/internal/symbol/stdlib.go b/internal/symbol/stdlib.go
index 485c8edb..573dd9b3 100644
--- a/internal/symbol/stdlib.go
+++ b/internal/symbol/stdlib.go
@@ -107,7 +107,7 @@ var pathToEmbeddedMethods = map[string]map[string]string{
// Embedded https://pkg.go.dev/debug/macho#File.Segment
"FatArch.Segment": "v1.3.0",
// https://pkg.go.dev/debug/macho@go1.10#Rpath
- // Embeddded https://pkg.go.dev/debug/macho#LoadBytes.Raw
+ // Embedded https://pkg.go.dev/debug/macho#LoadBytes.Raw
"Rpath.Raw": "v1.10.0",
},
"debug/plan9obj": {
diff --git a/internal/worker/server.go b/internal/worker/server.go
index 1378318c..0ad2b5b1 100644
--- a/internal/worker/server.go
+++ b/internal/worker/server.go
@@ -220,7 +220,7 @@ func (s *Server) Install(handle func(string, http.Handler)) {
handle("/repopulate-search-documents", rmw(s.errorHandler(s.handleRepopulateSearchDocuments)))
// manual: populate-excluded-prefixes inserts all excluded prefixes from
- // the file private/config/excluded.txt into the databse.
+ // the file private/config/excluded.txt into the database.
handle("/populate-excluded-prefixes", rmw(s.errorHandler(s.handlePopulateExcludedPrefixes)))
// manual: clear-cache clears the redis cache.
diff --git a/static/shared/chip/chip.md b/static/shared/chip/chip.md
index d3716df5..27bb63ba 100644
--- a/static/shared/chip/chip.md
+++ b/static/shared/chip/chip.md
@@ -11,7 +11,7 @@
```
```html #chip-highlighted
-<span class="go-Chip go-Chip--highlighted">Highlighed</span>
+<span class="go-Chip go-Chip--highlighted">Highlighted</span>
```
```html #chip-warning