From 09d3f31358882970d02018bd84bcbcd28b47f986 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Sat, 15 Oct 2022 14:29:50 +0800 Subject: [PATCH] fix a few function names on comments Signed-off-by: cui fliter --- pkg/action/lint.go | 2 +- pkg/engine/lookup_func.go | 2 +- pkg/plugin/installer/http_installer.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/action/lint.go b/pkg/action/lint.go index 5b566e9d3..4f7567beb 100644 --- a/pkg/action/lint.go +++ b/pkg/action/lint.go @@ -76,7 +76,7 @@ func (l *Lint) Run(paths []string, vals map[string]interface{}) *LintResult { return result } -// HasWaringsOrErrors checks is LintResult has any warnings or errors +// HasWarningsOrErrors checks is LintResult has any warnings or errors func HasWarningsOrErrors(result *LintResult) bool { for _, msg := range result.Messages { if msg.Severity > support.InfoSev { diff --git a/pkg/engine/lookup_func.go b/pkg/engine/lookup_func.go index d1bf1105a..b378ca9d6 100644 --- a/pkg/engine/lookup_func.go +++ b/pkg/engine/lookup_func.go @@ -77,7 +77,7 @@ func NewLookupFunction(config *rest.Config) lookupFunc { } } -// getDynamicClientOnUnstructured returns a dynamic client on an Unstructured type. This client can be further namespaced. +// getDynamicClientOnKind returns a dynamic client on an Unstructured type. This client can be further namespaced. func getDynamicClientOnKind(apiversion string, kind string, config *rest.Config) (dynamic.NamespaceableResourceInterface, bool, error) { gvk := schema.FromAPIVersionAndKind(apiversion, kind) apiRes, err := getAPIResourceForGVK(gvk, config) diff --git a/pkg/plugin/installer/http_installer.go b/pkg/plugin/installer/http_installer.go index bcbcbde93..49274f83c 100644 --- a/pkg/plugin/installer/http_installer.go +++ b/pkg/plugin/installer/http_installer.go @@ -162,13 +162,13 @@ func (i HTTPInstaller) Path() string { return helmpath.DataPath("plugins", i.PluginName) } -// CleanJoin resolves dest as a subpath of root. +// cleanJoin resolves dest as a subpath of root. // // This function runs several security checks on the path, generating an error if // the supplied `dest` looks suspicious or would result in dubious behavior on the // filesystem. // -// CleanJoin assumes that any attempt by `dest` to break out of the CWD is an attempt +// cleanJoin assumes that any attempt by `dest` to break out of the CWD is an attempt // to be malicious. (If you don't care about this, use the securejoin-filepath library.) // It will emit an error if it detects paths that _look_ malicious, operating on the // assumption that we don't actually want to do anything with files that already