File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -562,7 +562,7 @@ func Chain(ms ...MiddlewareFunc) MiddlewareFunc {
562
562
return chain (reversed ... )
563
563
}
564
564
565
- func UsageErrorPrefix (next HandlerFunc ) HandlerFunc {
565
+ func ShowUsageOnError (next HandlerFunc ) HandlerFunc {
566
566
return func (i * Invocation ) error {
567
567
err := next (i )
568
568
if err != nil {
@@ -584,8 +584,8 @@ func RequireRangeArgs(start, end int) MiddlewareFunc {
584
584
panic ("start must be >= 0" )
585
585
}
586
586
return func (next HandlerFunc ) HandlerFunc {
587
- // UsageErrorPrefix will add the command usage before the error message.
588
- return UsageErrorPrefix (func (i * Invocation ) error {
587
+ // ShowUsageOnError will add the command usage before the error message.
588
+ return ShowUsageOnError (func (i * Invocation ) error {
589
589
got := len (i .Args )
590
590
switch {
591
591
case start == end && got != start :
You can’t perform that action at this time.
0 commit comments