mirror of
https://github.com/gregtwallace/apc-p15-tool.git
synced 2025-06-04 02:46:51 +00:00
cleanup extra args logging / logic
This commit is contained in:
parent
3b611b06e4
commit
d94a10b949
2 changed files with 3 additions and 7 deletions
pkg/app
|
@ -54,13 +54,10 @@ func Start() {
|
|||
exitCode = 0
|
||||
app.logger.Info("\n\n", ffhelp.Command(app.cmd))
|
||||
|
||||
} else if errors.Is(err, ErrExtraArgs) {
|
||||
// extra args (will log elsewhere, so no need to log err again)
|
||||
app.logger.Info("\n\n", ffhelp.Command(app.cmd))
|
||||
|
||||
} else if errors.Is(err, ff.ErrDuplicateFlag) ||
|
||||
errors.Is(err, ff.ErrUnknownFlag) ||
|
||||
errors.Is(err, ff.ErrNoExec) {
|
||||
errors.Is(err, ff.ErrNoExec) ||
|
||||
errors.Is(err, ErrExtraArgs) {
|
||||
// other error that suggests user needs to see help
|
||||
app.logger.Error(err)
|
||||
app.logger.Info("\n\n", ffhelp.Command(app.cmd))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue