func (c *Car) isOk() (ret bool) {
    _, argsExist := c.Params["args"]
    if ! argsExist || c.Params["args"] == "0" {
        ret = true
    } else {
        ret = false
    }
    return
}
Checks for the return code.
package status
import (
    "github.com/jtyr/gbt/pkg/core/car"
    "github.com/jtyr/gbt/pkg/core/utils"
)
type Car struct {
    car.Car
}
func (c *Car) getSignal() (signal string) {
    _, argsExist := c.Params["args"]
    if ! argsExist {
        return "?"
    }
    switch c.Params["args"] {
        case  "-1": return "FATAL"
        case   "0": return "OK"
        case   "1": return "FAIL"
        case   "2": return "BLTINMUSE"
        case   "6": return "UNKADDR"
        case "126": return "NOEXEC"
        case "127": return "NOTFOUND"
        case "129": return "SIGHUP"
        case "130": return "SIGINT"
        case "131": return "SIGQUIT"
        case "132": return "SIGILL"
        case "133": return "SIGTRAP"
        case "134": return "SIGABRT"
        case "135": return "SIGBUS"
        case "136": return "SIGFPE"
        case "137": return "SIGKILL"
        case "138": return "SIGUSR1"
        case "139": return "SIGSEGV"
        case "140": return "SIGUSR2"
        case "141": return "SIGPIPE"
        case "142": return "SIGALRM"
        case "143": return "SIGTERM"
        case "145": return "SIGCHLD"
        case "146": return "SIGCONT"
        case "147": return "SIGSTOP"
        case "148": return "SIGTSTP"
        case "149": return "SIGTTIN"
        case "150": return "SIGTTOU"
        default:    return "UNK"
    }
}