use fmt.Errorf instead of errors.Errorf in docs.go

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

@ -22,7 +22,6 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/pkg/errors"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/spf13/cobra/doc" "github.com/spf13/cobra/doc"
"golang.org/x/text/cases" "golang.org/x/text/cases"
@ -99,6 +98,6 @@ func (o *docsOptions) run(out io.Writer) error {
case "bash": case "bash":
return o.topCmd.GenBashCompletionFile(filepath.Join(o.dest, "completions.bash")) return o.topCmd.GenBashCompletionFile(filepath.Join(o.dest, "completions.bash"))
default: default:
return errors.Errorf("unknown doc type %q. Try 'markdown' or 'man'", o.docTypeString) return fmt.Errorf("unknown doc type %q. Try 'markdown' or 'man'", o.docTypeString)
} }
} }

Loading…
Cancel
Save