File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,11 +189,10 @@ func (a *App) Run(arguments []string) (err error) {
189189 err := a .OnUsageError (context , err , false )
190190 HandleExitCoder (err )
191191 return err
192- } else {
193- fmt .Fprintf (a .Writer , "%s\n \n " , "Incorrect Usage." )
194- ShowAppHelp (context )
195- return err
196192 }
193+ fmt .Fprintf (a .Writer , "%s\n \n " , "Incorrect Usage." )
194+ ShowAppHelp (context )
195+ return err
197196 }
198197
199198 if ! a .HideHelp && checkHelp (context ) {
@@ -310,11 +309,10 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
310309 err = a .OnUsageError (context , err , true )
311310 HandleExitCoder (err )
312311 return err
313- } else {
314- fmt .Fprintf (a .Writer , "%s\n \n " , "Incorrect Usage." )
315- ShowSubcommandHelp (context )
316- return err
317312 }
313+ fmt .Fprintf (a .Writer , "%s\n \n " , "Incorrect Usage." )
314+ ShowSubcommandHelp (context )
315+ return err
318316 }
319317
320318 if len (a .Commands ) > 0 {
Original file line number Diff line number Diff line change @@ -132,12 +132,11 @@ func (c Command) Run(ctx *Context) (err error) {
132132 err := c .OnUsageError (ctx , err , false )
133133 HandleExitCoder (err )
134134 return err
135- } else {
136- fmt .Fprintln (ctx .App .Writer , "Incorrect Usage." )
137- fmt .Fprintln (ctx .App .Writer )
138- ShowCommandHelp (ctx , c .Name )
139- return err
140135 }
136+ fmt .Fprintln (ctx .App .Writer , "Incorrect Usage." )
137+ fmt .Fprintln (ctx .App .Writer )
138+ ShowCommandHelp (ctx , c .Name )
139+ return err
141140 }
142141
143142 nerr := normalizeFlags (c .Flags , set )
Original file line number Diff line number Diff line change @@ -182,9 +182,8 @@ func (f *IntSlice) Set(value string) error {
182182 tmp , err := strconv .Atoi (value )
183183 if err != nil {
184184 return err
185- } else {
186- * f = append (* f , tmp )
187185 }
186+ * f = append (* f , tmp )
188187 return nil
189188}
190189
You can’t perform that action at this time.
0 commit comments