INNER CODE UNIT · Go
signalExitCode
helmfile/helmfile · main.go:67
func signalExitCode(sig os.Signal) int {
switch sig {
case syscall.SIGINT:
return 130
case syscall.SIGTERM:
return 143
default:
return 1
}
}
// exitCodeOf extracts the exit code from the command result for the root-span
// attribute; success is 0.
func exitCodeOf(err error) int {
if err == nil {
return 0
}
if exitErr, ok := err.(errors.ExitCoder); ok {