mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-27 13:02:59 +02:00
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:
parent
b021dbd2d6
commit
e19ec9623b
@ -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
|
||||
|
@ -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", "")
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user