diff --git a/internal/fetch/unit_test.go b/internal/fetch/unit_test.go index a4a113084..47d4ac751 100644 --- a/internal/fetch/unit_test.go +++ b/internal/fetch/unit_test.go @@ -70,7 +70,7 @@ func TestDirectoryPaths(t *testing.T) { } } -// samplePackage constructs a package with the given module path and suffix. +// samplePackageMeta constructs a package with the given module path and suffix. // // If modulePath is the standard library, the package path is the // suffix, which must not be empty. Otherwise, the package path diff --git a/internal/frontend/fetchserver/404.go b/internal/frontend/fetchserver/404.go index 915ec9cd4..7841e2731 100644 --- a/internal/frontend/fetchserver/404.go +++ b/internal/frontend/fetchserver/404.go @@ -29,7 +29,7 @@ import ( "golang.org/x/pkgsite/internal/version" ) -// servePathNotFoundPage serves a 404 page for the requested path, or redirects +// ServePathNotFoundPage serves a 404 page for the requested path, or redirects // the user to an appropriate location. func (s *FetchServer) ServePathNotFoundPage(w http.ResponseWriter, r *http.Request, db internal.PostgresDB, fullPath, modulePath, requestedVersion string) (err error) { diff --git a/internal/frontend/fetchserver/fetch.go b/internal/frontend/fetchserver/fetch.go index 038334b2b..27f0fda06 100644 --- a/internal/frontend/fetchserver/fetch.go +++ b/internal/frontend/fetchserver/fetch.go @@ -91,7 +91,7 @@ type FetchServer struct { TaskIDChangeInterval time.Duration } -// serveFetch checks if a requested path and version exists in the database. +// ServeFetch checks if a requested path and version exists in the database. // If not, it will enqueue potential module versions that could contain // the requested path and version to a task queue, to be fetched by the worker. // Meanwhile, the request will poll the database until a row is found, or a diff --git a/internal/postgres/test_helper.go b/internal/postgres/test_helper.go index 1f990a048..3702623d2 100644 --- a/internal/postgres/test_helper.go +++ b/internal/postgres/test_helper.go @@ -188,7 +188,7 @@ func addLatest(ctx context.Context, t *testing.T, db *DB, modulePath, version, m return lmv } -// InsertSampleDirectory tree inserts a set of packages for testing +// InsertSampleDirectoryTree inserts a set of packages for testing // GetUnit and frontend.FetchDirectoryDetails. func InsertSampleDirectoryTree(ctx context.Context, t *testing.T, testDB *DB) { t.Helper() diff --git a/internal/static/config.go b/internal/static/config.go index 087ce468c..0b5d7a4b8 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 build TypeScript + // EntryPoint is a directory in which to build TypeScript // sources. EntryPoint string diff --git a/internal/stdlib/testdata/v1.12.5/src/cmd/pprof/readlineui.go b/internal/stdlib/testdata/v1.12.5/src/cmd/pprof/readlineui.go index 5b9701a0e..d050e9755 100644 --- a/internal/stdlib/testdata/v1.12.5/src/cmd/pprof/readlineui.go +++ b/internal/stdlib/testdata/v1.12.5/src/cmd/pprof/readlineui.go @@ -53,7 +53,7 @@ func newReadlineUI() driver.UI { return &readlineUI{term: terminal.NewTerminal(rw, "")} } -// Read returns a line of text (a command) read from the user. +// ReadLine returns a line of text (a command) read from the user. // prompt is printed before reading the command. func (r *readlineUI) ReadLine(prompt string) (string, error) { r.term.SetPrompt(prompt) diff --git a/internal/testing/fakedatasource/fakedatasource.go b/internal/testing/fakedatasource/fakedatasource.go index 0a5b1aaeb..1f6951963 100644 --- a/internal/testing/fakedatasource/fakedatasource.go +++ b/internal/testing/fakedatasource/fakedatasource.go @@ -425,7 +425,7 @@ func (ds *FakeDataSource) GetVersionsForPath(ctx context.Context, path string) ( return infos, nil } -// TrimSlashVersionPrefix trims a /vN path component prefix if one is present in path, +// trimSlashVersionPrefix trims a /vN path component prefix if one is present in path, // and returns path unchanged otherwise. func trimSlashVersionPrefix(path string) string { if !strings.HasPrefix(path, "/v") {