forked from Plemya-x/ALR
refactor
This commit is contained in:
@ -46,3 +46,11 @@ func HandleExitCoder(err error) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func FormatCliExit(msg string, err error) cli.ExitCoder {
|
||||
return FormatCliExitWithCode(msg, err, 1)
|
||||
}
|
||||
|
||||
func FormatCliExitWithCode(msg string, err error, exitCode int) cli.ExitCoder {
|
||||
return cli.Exit(fmt.Errorf("%s: %w", msg, err), exitCode)
|
||||
}
|
||||
|
Reference in New Issue
Block a user