Documentation
¶
Overview ¶
Package exitcode provides centralized exit codes for CLI commands. All commands should import this package to ensure consistent exit codes.
Index ¶
Constants ¶
View Source
const ( // Success indicates successful execution. Success = 0 // GeneralError indicates an unspecified error occurred. GeneralError = 1 // ValidationFailed indicates input validation failed. ValidationFailed = 2 // InvalidInput indicates invalid solution structure (e.g., circular dependency). InvalidInput = 3 // FileNotFound indicates a file was not found or could not be parsed. FileNotFound = 4 // RenderFailed indicates rendering/transformation failed. RenderFailed = 5 // ActionFailed indicates action/workflow execution failed. ActionFailed = 6 // ConfigError indicates a configuration error. ConfigError = 7 // CatalogError indicates a catalog operation failed. CatalogError = 8 // TimeoutError indicates an operation timed out. TimeoutError = 9 // PermissionDenied indicates insufficient permissions. PermissionDenied = 10 // TestFailed indicates one or more functional tests failed. TestFailed = 11 )
Standard exit codes for CLI commands. These follow common Unix conventions where possible.
Variables ¶
This section is empty.
Functions ¶
func Description ¶
Description returns a human-readable description of an exit code.
Types ¶
type ExitError ¶
ExitError wraps an error with an exit code. Commands can return this to indicate a specific exit code should be used. The error message should already be printed by the command before returning.
func AsError ¶
AsError creates an ExitError with GeneralError (1) exit code. This is a convenience for commands that just need to signal failure after printing their own error message.
Click to show internal directories.
Click to hide internal directories.