This commit is contained in:
2025-04-13 19:54:04 +03:00
parent f26b72b2a2
commit b8cb7af3bb
14 changed files with 213 additions and 261 deletions

View File

@ -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)
}