Skip to content

Commit

Permalink
all: make function and struct comments match the names
Browse files Browse the repository at this point in the history
Change-Id: Ic939b5b002e881f8041ccb95114010fe7e751f9a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/639558
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
kokoro-CI: kokoro <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
  • Loading branch information
cuishuang authored and gopherbot committed Jan 3, 2025
1 parent 8bad909 commit f8b0e9b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion internal/fetch/unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/frontend/fetchserver/404.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/frontend/fetchserver/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/postgres/test_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion internal/static/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion internal/testing/fakedatasource/fakedatasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit f8b0e9b

Please sign in to comment.