Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: fix function name in comments #18726

Merged
merged 1 commit into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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