use fmt pkg for Errorf methods

Signed-off-by: James Sheppard <jgsheppa@protonmail.com>
pull/12063/head
James Sheppard 2 years ago
parent d75947d527
commit db9c18baed

@ -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

Loading…
Cancel
Save