Skip to content

Commit 81f6f8d

Browse files
cuishuanggopherbot
authored andcommitted
internal: fix some comments
Change-Id: I837c46bba9cd5c012670b432274c6e3318a3275b Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/465997 Reviewed-by: Suzy Mueller <[email protected]> Run-TryBot: Suzy Mueller <[email protected]> Reviewed-by: David Chase <[email protected]> TryBot-Result: kokoro <[email protected]> Auto-Submit: Suzy Mueller <[email protected]>
1 parent f93c7b3 commit 81f6f8d

File tree

15 files changed

+15
-15
lines changed

15 files changed

+15
-15
lines changed

internal/auth/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func idtokenArgs(jsonCreds []byte, useExp bool) (string, []idtoken.ClientOption)
6666
return audience, opts
6767
}
6868

69-
// NewClient creates an http.Client that adds an Authorization header
69+
// NewClientBearer creates an http.Client that adds an Authorization header
7070
// containing its argument as a bearer token.
7171
func NewClientBearer(token string) *http.Client {
7272
return &http.Client{

internal/dcensus/dcensus.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func (r *monitoredResource) MonitoredResource() (resType string, labels map[stri
115115
return r.Type, r.Labels
116116
}
117117

118-
// ExportToStackdriver checks to see if the process is running in a GCP
118+
// exportToStackdriver checks to see if the process is running in a GCP
119119
// environment, and if so configures exporting to stackdriver.
120120
func exportToStackdriver(ctx context.Context, cfg *config.Config) {
121121
if cfg.ProjectID == "" {

internal/experiment/experiment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func (s *Set) Active() []string {
2828
return es
2929
}
3030

31-
// FromContent returns the set of experiments enabled for the content.
31+
// FromContext returns the set of experiments enabled for the context.
3232
func FromContext(ctx context.Context) *Set {
3333
s, _ := ctx.Value(contextKey{}).(*Set)
3434
return s

internal/fetch/getters.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ type fsProxyModuleGetter struct {
212212
allowed map[internal.Modver]bool
213213
}
214214

215-
// NewFSModuleGetter return a ModuleGetter that reads modules from a filesystem
215+
// NewFSProxyModuleGetter returns a ModuleGetter that reads modules from a filesystem
216216
// directory organized like the proxy.
217217
// If allowed is non-empty, only module@versions in allowed are served; others
218218
// result in NotFound errors.

internal/frontend/breadcrumb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"golang.org/x/pkgsite/internal/version"
1313
)
1414

15-
// displayBreadcrumbs appends additional breadcrumb links for display
15+
// displayBreadcrumb appends additional breadcrumb links for display
1616
// to those for the given unit.
1717
func displayBreadcrumb(um *internal.UnitMeta, requestedVersion string) breadcrumb {
1818
bc := breadcrumbPath(um.Path, um.ModulePath, requestedVersion)

internal/frontend/playground.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ type fmtResponse struct {
5151
Error string
5252
}
5353

54-
// fmtHandler takes a Go program in its "body" form value, formats it with
54+
// handleFmt takes a Go program in its "body" form value, formats it with
5555
// standard gofmt formatting, and writes a fmtResponse as a JSON object.
5656
func (s *Server) handleFmt(w http.ResponseWriter, r *http.Request) {
5757
resp := new(fmtResponse)

internal/frontend/symbol.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (s *Symbol) addBuilds(builds ...internal.BuildContext) {
6464
}
6565
}
6666

67-
// symbolsForVersions returns an array of symbols for use in the VersionSummary
67+
// symbolsForVersion returns an array of symbols for use in the VersionSummary
6868
// of the specified version.
6969
func symbolsForVersion(pkgURLPath string, symbolsAtVersion map[string]map[internal.SymbolMeta]*internal.SymbolBuildContexts) [][]*Symbol {
7070
nameToMetaToSymbol := map[string]map[internal.SymbolMeta]*Symbol{}

internal/frontend/tabs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func init() {
7474
}
7575
}
7676

77-
// fetchDetailsForPackage returns tab details by delegating to the correct detail
77+
// fetchDetailsForUnit returns tab details by delegating to the correct detail
7878
// handler.
7979
func fetchDetailsForUnit(ctx context.Context, r *http.Request, tab string, ds internal.DataSource, um *internal.UnitMeta,
8080
requestedVersion string, bc internal.BuildContext,

internal/frontend/versions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ func shortRationale(rationale string) string {
325325
return rationale
326326
}
327327

328-
// pseudoVersionRev extracts the pseudo version base, excluding the timestamp.
328+
// pseudoVersionBase extracts the pseudo version base, excluding the timestamp.
329329
// It assumes the pseudo version is correctly formatted.
330330
//
331331
// See TestPseudoVersionBase for examples.

internal/godoc/encode.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func (p *Package) Encode(ctx context.Context) (_ []byte, err error) {
3636
return p.fastEncode()
3737
}
3838

39-
// DecodPackage decodes a byte slice encoded with Package.Encode into a Package.
39+
// DecodePackage decodes a byte slice encoded with Package.Encode into a Package.
4040
func DecodePackage(data []byte) (_ *Package, err error) {
4141
defer derrors.Wrap(&err, "DecodePackage()")
4242

0 commit comments

Comments
 (0)