Skip to content

Commit

Permalink
Fix: fix function name in comments (#18726)
Browse files Browse the repository at this point in the history
fix function name in comments

Signed-off-by: cui fliter <imcusg@gmail.com>
  • Loading branch information
cuishuang authored May 31, 2023
1 parent b021dbd commit e19ec96
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/common/http/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@ func WithInsecureSkipVerify(skipVerify bool) func(*http.Transport) {
}
}

// WithMaxIdleConnsPerHost returns a TransportOption that configures the transport to use the specified number of idle connections per host
// WithMaxIdleConns returns a TransportOption that configures the transport to use the specified number of idle connections per host
func WithMaxIdleConns(maxIdleConns int) func(*http.Transport) {
return func(tr *http.Transport) {
tr.MaxIdleConns = maxIdleConns
}
}

// WithIdleConnTimeout returns a TransportOption that configures the transport to use the specified idle connection timeout
// WithIdleconnectionTimeout returns a TransportOption that configures the transport to use the specified idle connection timeout
func WithIdleconnectionTimeout(idleConnectionTimeout time.Duration) func(*http.Transport) {
return func(tr *http.Transport) {
tr.IdleConnTimeout = idleConnectionTimeout
Expand Down
2 changes: 1 addition & 1 deletion src/lib/strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"golang.org/x/text/language"
)

// TrimsLineBreaks trims line breaks in string.
// TrimLineBreaks trims line breaks in string.
func TrimLineBreaks(s string) string {
escaped := strings.ReplaceAll(s, "\n", "")
escaped = strings.ReplaceAll(escaped, "\r", "")
Expand Down
2 changes: 1 addition & 1 deletion src/lib/trace/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func NewConfig(opts ...Option) Config {
return c
}

// GetConfig returns the global configuration for trace
// GetGlobalConfig returns the global configuration for trace
func GetGlobalConfig() Config {
return C
}
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/reg/adapter/dockerhub/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ func (a *adapter) getTags(namespace, repo string, page, pageSize int) (*TagsResp
return tags, nil
}

// getFilter gets specific type filter value from filters list.
// getStringFilterValue gets specific type filter value from filters list.
func (a *adapter) getStringFilterValue(filterType string, filters []*model.Filter) (string, error) {
for _, f := range filters {
if f.Type == filterType {
Expand Down
2 changes: 1 addition & 1 deletion src/server/middleware/repoproxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func defaultManifestURL(projectName string, name string, a lib.ArtifactInfo) str
return fmt.Sprintf("/v2/%s/library/%s/manifests/%s", projectName, name, a.Reference)
}

// defaultManifestURL return the real url for request with default project
// defaultBlobURL return the real url for request with default project
func defaultBlobURL(projectName string, name string, digest string) string {
return fmt.Sprintf("/v2/%s/library/%s/blobs/%s", projectName, name, digest)
}
Expand Down
2 changes: 1 addition & 1 deletion src/server/v2.0/handler/preheat.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ func convertPolicyToPayload(policy *policy.Schema) (*models.PreheatPolicy, error
}, nil
}

// convertParamPolicyToPolicy converts params policy to pkg model policy
// convertParamPolicyToModelPolicy converts params policy to pkg model policy
func convertParamPolicyToModelPolicy(model *models.PreheatPolicy) (*policy.Schema, error) {
if model == nil {
return nil, errors.New("policy can not be nil")
Expand Down

0 comments on commit e19ec96

Please sign in to comment.