chinampa/pkg/statuscode/statuscode.go

26 lines
756 B
Go
Raw Permalink Normal View History

2022-12-31 05:53:24 +00:00
// Copyright © 2022 Roberto Hidalgo <chinampa@un.rob.mx>
// SPDX-License-Identifier: Apache-2.0
/*
package statuscode manages exit codes for programs.
See `man sysexits || grep "#define EX" /usr/include/sysexits.h`
and https://tldp.org/LDP/abs/html/exitcodes.html
*/
2022-12-31 05:53:24 +00:00
package statuscode
const (
// Ok means everything is fine.
2022-12-31 05:53:24 +00:00
Ok = 0
// RenderHelp provides answers to life, the universe and everything; also, renders help.
2022-12-31 05:53:24 +00:00
RenderHelp = 42
// Usage means bad arguments were provided by the user.
2022-12-31 05:53:24 +00:00
Usage = 64
// ProgrammerError means the developer made a mistake.
2022-12-31 05:53:24 +00:00
ProgrammerError = 70
// ConfigError means configuration files or the environment is misconfigured.
2022-12-31 05:53:24 +00:00
ConfigError = 78
// NotFound means a sub-command not was found.
2022-12-31 05:53:24 +00:00
NotFound = 127
)