Refactor CLI exit code and error handling

This commit is contained in:
2021-01-17 21:08:13 -06:00
parent 5cc5be7846
commit e024b45e0a
11 changed files with 47 additions and 35 deletions

View File

@ -33,8 +33,8 @@ func PoweronCmd(args CmdArgs) (int, error) {
r, err := c.SetState(selector, state)
if err != nil {
return 1, err
return ExitError, err
}
PrintResults(r.Results)
return 0, nil
return ExitSuccess, nil
}