From 5767f13aaa5bfb513747b73f3c5d8cd4b0640684 Mon Sep 17 00:00:00 2001 From: xichengliudui <1693291525@qq.com> Date: Sun, 10 Feb 2019 23:57:53 -0500 Subject: [PATCH] Fix function comment to consistent with its name Signed-off-by: xichengliudui <1693291525@qq.com> --- pkg/chartutil/capabilities.go | 2 +- pkg/chartutil/requirements.go | 2 +- pkg/downloader/chart_downloader.go | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/chartutil/capabilities.go b/pkg/chartutil/capabilities.go index d7e660b8a..b4533e417 100644 --- a/pkg/chartutil/capabilities.go +++ b/pkg/chartutil/capabilities.go @@ -40,7 +40,7 @@ var ( // Capabilities describes the capabilities of the Kubernetes cluster that Tiller is attached to. type Capabilities struct { - // List of all supported API versions + // APIVersions list of all supported API versions APIVersions VersionSet // KubeVersion is the Kubernetes version KubeVersion *version.Info diff --git a/pkg/chartutil/requirements.go b/pkg/chartutil/requirements.go index 0f1128305..f21a22005 100644 --- a/pkg/chartutil/requirements.go +++ b/pkg/chartutil/requirements.go @@ -85,7 +85,7 @@ type Requirements struct { // // It represents the state that the dependencies should be in. type RequirementsLock struct { - // Genderated is the date the lock file was last generated. + // Generated is the date the lock file was last generated. Generated time.Time `json:"generated"` // Digest is a hash of the requirements file used to generate it. Digest string `json:"digest"` diff --git a/pkg/downloader/chart_downloader.go b/pkg/downloader/chart_downloader.go index 5e6287299..453e81470 100644 --- a/pkg/downloader/chart_downloader.go +++ b/pkg/downloader/chart_downloader.go @@ -65,11 +65,11 @@ type ChartDownloader struct { Keyring string // HelmHome is the $HELM_HOME. HelmHome helmpath.Home - // Getter collection for the operation + // Getters collection for the operation Getters getter.Providers - // Chart repository username + // Username chart repository username Username string - // Chart repository password + // Password chart repository password Password string } @@ -243,14 +243,14 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (*url.URL, ge return u, r.Client, nil } -// If HttpGetter is used, this method sets the configured repository credentials on the HttpGetter. +// setCredentials if HttpGetter is used, this method sets the configured repository credentials on the HttpGetter. func (c *ChartDownloader) setCredentials(r *repo.ChartRepository) { if t, ok := r.Client.(*getter.HttpGetter); ok { t.SetCredentials(c.getRepoCredentials(r)) } } -// If this ChartDownloader is not configured to use credentials, and the chart repository sent as an argument is, +// getRepoCredentials if this ChartDownloader is not configured to use credentials, and the chart repository sent as an argument is, // then the repository's configured credentials are returned. // Else, this ChartDownloader's credentials are returned. func (c *ChartDownloader) getRepoCredentials(r *repo.ChartRepository) (username, password string) {