mirror of
https://github.com/helm/helm.git
synced 2026-02-18 18:29:23 -05:00
fix(pkg): errorlint linter
#### Description errorlint linter in pkg Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
parent
9b22aa4e05
commit
4330bdea04
4 changed files with 4 additions and 4 deletions
|
|
@ -157,7 +157,7 @@ func makeDefaultCapabilities() (*Capabilities, error) {
|
|||
|
||||
v, err := semver.NewVersion(vstr)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to parse k8s.io/client-go version %q: %v", vstr, err)
|
||||
return nil, fmt.Errorf("unable to parse k8s.io/client-go version %q: %w", vstr, err)
|
||||
}
|
||||
|
||||
kubeVersionMajor := v.Major() + 1
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
|
|||
if kubeVersion != "" {
|
||||
parsedKubeVersion, err := common.ParseKubeVersion(kubeVersion)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid kube version '%s': %s", kubeVersion, err)
|
||||
return fmt.Errorf("invalid kube version '%s': %w", kubeVersion, err)
|
||||
}
|
||||
client.KubeVersion = parsedKubeVersion
|
||||
}
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ func (c *ChartDownloader) ResolveChartVersion(ref, version string) (string, *url
|
|||
if err != nil {
|
||||
// If there is no special config, return the default HTTP client and
|
||||
// swallow the error.
|
||||
if err == ErrNoOwnerRepo {
|
||||
if errors.Is(err, ErrNoOwnerRepo) {
|
||||
// Make sure to add the ref URL as the URL for the getter
|
||||
c.Options = append(c.Options, getter.WithURL(ref))
|
||||
return "", u, nil
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ func (t *literalParser) key(data map[string]interface{}, nestedNameLevel int) (r
|
|||
case lastRune == '=':
|
||||
// found end of key: swallow the '=' and get the value
|
||||
value, err := t.val()
|
||||
if err == nil && err != io.EOF {
|
||||
if err == nil && !errors.Is(err, io.EOF) {
|
||||
return err
|
||||
}
|
||||
set(data, string(key), string(value))
|
||||
|
|
|
|||
Loading…
Reference in a new issue