Documentation
¶
Index ¶
Constants ¶
View Source
const ( ExitOK = 0 ExitUsage = 2 // client-side validation / conflicting flags ExitBadRequest = 3 // server 4xx (non-429), bad REF, not found ExitRateLimited = 4 // server 429 ExitServerNetwork = 5 // 5xx, network failures, clipboard, etc. )
Process exit codes used across all commands. See README for the contract.
Variables ¶
This section is empty.
Functions ¶
func ConfigureColor ¶
func ConfigureColor(forceOff bool)
ConfigureColor disables color when not on a TTY or when forced off. NO_COLOR env var is honored automatically by fatih/color via its NoColor flag.
func HandleError ¶
HandleError maps an error to (message, exit code) following the conventions. It writes the message to stderr and returns the code; the caller should os.Exit it.
func IsStderrTTY ¶
func IsStderrTTY() bool
IsStderrTTY reports whether stderr is connected to a terminal.
func IsStdoutTTY ¶
func IsStdoutTTY() bool
IsStdoutTTY reports whether stdout is connected to a terminal.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.