Merge pull request #31816 from mmorel-35/errorlint-pkg-7-6d6a660
Some checks are pending
build-test / build (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
golangci-lint / golangci-lint (push) Waiting to run
govulncheck / govulncheck (push) Waiting to run
release / release (push) Waiting to run
release / canary-release (push) Waiting to run
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run

fix(pkg): errorlint linter
This commit is contained in:
Matt Farina 2026-02-18 21:46:10 +01:00 committed by GitHub
commit 794372e317
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 5 additions and 5 deletions

View file

@ -172,7 +172,7 @@ func EnsureArchive(name string, raw *os.File) error {
buffer := make([]byte, 512)
_, err := raw.Read(buffer)
if err != nil && err != io.EOF {
return fmt.Errorf("file '%s' cannot be read: %s", name, err)
return fmt.Errorf("file '%s' cannot be read: %w", name, err)
}
// Helm may identify achieve of the application/x-gzip as application/vnd.ms-fontobject.

View file

@ -153,7 +153,7 @@ func validateChartVersion(cf *chart.Metadata) error {
valid, msg := c.Validate(version)
if !valid && len(msg) > 0 {
return fmt.Errorf("version %v", msg[0])
return fmt.Errorf("version %w", msg[0])
}
return nil

View file

@ -61,7 +61,7 @@ func newRollbackCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
if len(args) > 1 {
ver, err := strconv.Atoi(args[1])
if err != nil {
return fmt.Errorf("could not convert revision to a number: %v", err)
return fmt.Errorf("could not convert revision to a number: %w", err)
}
client.Version = ver
}

View file

@ -141,7 +141,7 @@ func (h *hubSearchWriter) WriteTable(out io.Writer) error {
_, err := out.Write([]byte("No results found\n"))
if err != nil {
return fmt.Errorf("unable to write results: %s", err)
return fmt.Errorf("unable to write results: %w", err)
}
return nil
}

View file

@ -221,7 +221,7 @@ func (r *repoSearchWriter) WriteTable(out io.Writer) error {
_, err := out.Write([]byte("No results found\n"))
if err != nil {
return fmt.Errorf("unable to write results: %s", err)
return fmt.Errorf("unable to write results: %w", err)
}
return nil
}