Documentation
¶
Overview ¶
Package exitcode is the error type that the publisher commands return for a failure that is not a finding: bad usage, or an environment that cannot run the command. It carries exit code 2.
The process exit code is chosen by main's commandExitCode, which passes through the ExitCode() of any error in the chain (errors.As) when it is in 1..255 and otherwise exits 1. So returning one of these errors from a command is all that is needed, and no existing command changes: they return plain errors and keep exiting 1.
By the convention of the publisher commands, 0 means everything passed, 1 means the check ran and found something wrong, and 2 means it could not run as asked.
Index ¶
Constants ¶
const UsageCode = 2
UsageCode is the exit code for a usage or environment error.
Variables ¶
This section is empty.