Cleaned up else per golint

When an if ends in a return the else is not required. golint
detects these conditions and found these.
This commit is contained in:
Matt Farina
2016-05-09 10:15:05 -04:00
parent 2f110bd745
commit 07ce8bf79c
3 changed files with 11 additions and 15 deletions

View File

@@ -132,12 +132,11 @@ func (c Command) Run(ctx *Context) (err error) {
err := c.OnUsageError(ctx, err, false)
HandleExitCoder(err)
return err
} else {
fmt.Fprintln(ctx.App.Writer, "Incorrect Usage.")
fmt.Fprintln(ctx.App.Writer)
ShowCommandHelp(ctx, c.Name)
return err
}
fmt.Fprintln(ctx.App.Writer, "Incorrect Usage.")
fmt.Fprintln(ctx.App.Writer)
ShowCommandHelp(ctx, c.Name)
return err
}
nerr := normalizeFlags(c.Flags, set)