mirror of
https://github.com/helm/helm.git
synced 2026-02-18 18:29:23 -05:00
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
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:
commit
794372e317
5 changed files with 5 additions and 5 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue