action: use errors.New instead of fmt.Errorf for static string

Fixes revive lint: unnecessary-format.

Signed-off-by: Ilya Kislitsyn <kis-ilya-a@yandex.ru>
Signed-off-by: Ilya Kiselev <kis-ilya-a@yandex.ru>
This commit is contained in:
Ilya Kiselev 2026-04-06 16:17:53 +03:00
parent 6f584a40e0
commit 2ce8dbd3a9

View file

@ -17,7 +17,7 @@ limitations under the License.
package action
import (
"fmt"
"errors"
"io"
"helm.sh/helm/v4/pkg/cli"
@ -100,7 +100,7 @@ func (p *Push) Run(chartRef string, remote string) (*registry.PushResult, error)
if registry.IsOCI(remote) {
if p.cfg == nil {
return nil, fmt.Errorf("missing action configuration: use WithPushConfig when constructing Push")
return nil, errors.New("missing action configuration: use WithPushConfig when constructing Push")
}
// Don't use the default registry client if tls options are set.
c.Options = append(c.Options, pusher.WithRegistryClient(p.cfg.RegistryClient))