File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package clibase
3
3
import (
4
4
"context"
5
5
"errors"
6
- "fmt"
7
6
"io"
8
7
"os"
9
8
"strings"
@@ -370,7 +369,7 @@ func RequireRangeArgs(start, end int) MiddlewareFunc {
370
369
case 0 :
371
370
return xerrors .Errorf ("wanted no args but got %v %v" , got , i .Args )
372
371
default :
373
- return fmt .Errorf (
372
+ return xerrors .Errorf (
374
373
"wanted %v args but got %v %v" ,
375
374
start ,
376
375
got ,
@@ -380,7 +379,7 @@ func RequireRangeArgs(start, end int) MiddlewareFunc {
380
379
case start > 0 && end == - 1 :
381
380
switch {
382
381
case got < start :
383
- return fmt .Errorf (
382
+ return xerrors .Errorf (
384
383
"wanted at least %v args but got %v" ,
385
384
start ,
386
385
got ,
@@ -391,7 +390,7 @@ func RequireRangeArgs(start, end int) MiddlewareFunc {
391
390
case start > end :
392
391
panic ("start must be <= end" )
393
392
case got < start || got > end :
394
- return fmt .Errorf (
393
+ return xerrors .Errorf (
395
394
"wanted between %v and %v args but got %v" ,
396
395
start , end ,
397
396
got ,
You can’t perform that action at this time.
0 commit comments