fix golint failure in pkg/action

Signed-off-by: Song Shukun <song.shukun@fujitsu.com>
pull/7622/head
Song Shukun 5 years ago
parent 0c9e99dce5
commit e9f40ed7a5

@ -135,6 +135,7 @@ func (c *Configuration) getCapabilities() (*chartutil.Capabilities, error) {
return c.Capabilities, nil return c.Capabilities, nil
} }
// KubernetesClientSet creates a new kubernetes ClientSet based on the configuration
func (c *Configuration) KubernetesClientSet() (kubernetes.Interface, error) { func (c *Configuration) KubernetesClientSet() (kubernetes.Interface, error) {
conf, err := c.RESTClientGetter.ToRESTConfig() conf, err := c.RESTClientGetter.ToRESTConfig()
if err != nil { if err != nil {
@ -219,7 +220,7 @@ func (c *Configuration) recordRelease(r *release.Release) {
} }
} }
// InitActionConfig initializes the action configuration // Init initializes the action configuration
func (c *Configuration) Init(getter genericclioptions.RESTClientGetter, namespace string, helmDriver string, log DebugLog) error { func (c *Configuration) Init(getter genericclioptions.RESTClientGetter, namespace string, helmDriver string, log DebugLog) error {
kc := kube.New(getter) kc := kube.New(getter)
kc.Log = log kc.Log = log

@ -38,6 +38,7 @@ type Lint struct {
WithSubcharts bool WithSubcharts bool
} }
// LintResult is the result of Lint
type LintResult struct { type LintResult struct {
TotalChartsLinted int TotalChartsLinted int
Messages []support.Message Messages []support.Message

@ -238,7 +238,7 @@ func filterList(releases []*release.Release) []*release.Release {
return list return list
} }
// setStateMask calculates the state mask based on parameters. // SetStateMask calculates the state mask based on parameters.
func (l *List) SetStateMask() { func (l *List) SetStateMask() {
if l.All { if l.All {
l.StateMask = ListAll l.StateMask = ListAll

@ -112,6 +112,7 @@ func setVersion(ch *chart.Chart, ver string) error {
return nil return nil
} }
// Clearsign signs a chart
func (p *Package) Clearsign(filename string) error { func (p *Package) Clearsign(filename string) error {
// Load keyring // Load keyring
signer, err := provenance.NewFromKeyring(p.Keyring, p.Key) signer, err := provenance.NewFromKeyring(p.Keyring, p.Key)

@ -27,12 +27,17 @@ import (
"helm.sh/helm/v3/pkg/chartutil" "helm.sh/helm/v3/pkg/chartutil"
) )
// ShowOutputFormat is the format of the output of `helm show`
type ShowOutputFormat string type ShowOutputFormat string
const ( const (
// ShowAll is the format which shows all the information of a chart
ShowAll ShowOutputFormat = "all" ShowAll ShowOutputFormat = "all"
// ShowChart is the format which only shows the chart's definition
ShowChart ShowOutputFormat = "chart" ShowChart ShowOutputFormat = "chart"
// ShowValues is the format which only shows the chart's values
ShowValues ShowOutputFormat = "values" ShowValues ShowOutputFormat = "values"
// ShowReadme is the format which only shows the chart's README
ShowReadme ShowOutputFormat = "readme" ShowReadme ShowOutputFormat = "readme"
) )

Loading…
Cancel
Save