From 34a1afa34fdbd811526de5926a44fa2a27418a2b Mon Sep 17 00:00:00 2001 From: cuishuang Date: Tue, 21 Oct 2025 10:24:51 +0800 Subject: all: fix some comments Change-Id: Ia70b35ab9aef270692a3892629c3c81208771089 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/713360 Reviewed-by: Dmitri Shuralyov Reviewed-by: Sean Liao kokoro-CI: kokoro Auto-Submit: Sean Liao LUCI-TryBot-Result: Go LUCI Reviewed-by: David Chase --- deploy/migrate.yaml | 2 +- internal/config/config.go | 2 +- internal/fetch/fetchdata_test.go | 2 +- internal/frontend/latest_version_test.go | 2 +- internal/frontend/markdown.go | 4 ++-- internal/frontend/search.go | 2 +- internal/frontend/versions/versions.go | 2 +- internal/godoc/dochtml/internal/render/synopsis_test.go | 2 +- internal/proxy/proxytest/module.go | 2 +- internal/stdlib/testdata/v1.12.5/src/context/context.go | 6 +++--- internal/stdlib/testdata/v1.12.5/src/context/context_test.go | 4 ++-- internal/stdlib/testdata/v1.12.5/src/context/example_test.go | 2 +- internal/symbol/stdlib.go | 2 +- internal/worker/server.go | 2 +- static/shared/chip/chip.md | 2 +- 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, `
Highlighed +Highlighted ``` ```html #chip-warning -- cgit v1.3