Fix: fix function name in comments (#18726)

fix function name in comments

Signed-off-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
cui fliter 2023-05-31 10:26:19 +08:00 committed by GitHub
parent b021dbd2d6
commit e19ec9623b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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", "")

View File

@ -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
}

View File

@ -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 {

View File

@ -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)
}

View File

@ -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")