From db9c18baed238d9702e9296bee15f70442c97ed3 Mon Sep 17 00:00:00 2001 From: James Sheppard Date: Sun, 7 May 2023 16:35:24 +0000 Subject: [PATCH] use fmt pkg for Errorf methods Signed-off-by: James Sheppard --- cmd/helm/repo_add.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/helm/repo_add.go b/cmd/helm/repo_add.go index 6837a4ba3..1fa5492dd 100644 --- a/cmd/helm/repo_add.go +++ b/cmd/helm/repo_add.go @@ -178,7 +178,7 @@ func (o *repoAddOptions) run(out io.Writer) error { // Check if the repo name is legal if strings.Contains(o.name, "/") { - return errors.Errorf("repository name (%s) contains '/', please specify a different name without '/'", o.name) + return fmt.Errorf("repository name (%s) contains '/', please specify a different name without '/'", o.name) } // If the repo exists do one of two things: @@ -190,7 +190,7 @@ func (o *repoAddOptions) run(out io.Writer) error { // The input coming in for the name is different from what is already // configured. Return an error. - return errors.Errorf("repository name (%s) already exists, please specify a different name", o.name) + return fmt.Errorf("repository name (%s) already exists, please specify a different name", o.name) } // The add is idempotent so do nothing