cmd: use errrors.New instead of empty fmt.Errorf (#27329)

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
Delweng
2023-05-24 12:21:29 +02:00
committed by GitHub
parent 9231770811
commit e9c3183c52
20 changed files with 50 additions and 38 deletions
+2 -2
View File
@@ -59,7 +59,7 @@ var (
func nodesetInfo(ctx *cli.Context) error {
if ctx.NArg() < 1 {
return fmt.Errorf("need nodes file as argument")
return errors.New("need nodes file as argument")
}
ns := loadNodesJSON(ctx.Args().First())
@@ -98,7 +98,7 @@ func showAttributeCounts(ns nodeSet) {
func nodesetFilter(ctx *cli.Context) error {
if ctx.NArg() < 1 {
return fmt.Errorf("need nodes file as argument")
return errors.New("need nodes file as argument")
}
// Parse -limit.
limit, err := parseFilterLimit(ctx.Args().Tail())