Documentation
¶
Index ¶
Constants ¶
View Source
const ( ExitOK = 0 // Success ExitGeneral = 1 // General error ExitUsage = 2 // Invalid usage / bad arguments ExitAuth = 3 // Authentication failure ExitNotFound = 4 // Resource not found ExitConflict = 5 // Conflict (resource already exists) ExitForbidden = 6 // Permission denied ExitRateLimit = 75 // Rate limited (EX_TEMPFAIL from sysexits.h) ExitTimeout = 8 // Request timeout ExitAPIError = 9 // Zoho API error (non-specific) ExitConfigError = 10 // Configuration error ExitNetworkError = 11 // Network connectivity error )
Exit codes following sysexits.h convention
Variables ¶
This section is empty.
Functions ¶
func ExitWithError ¶
ExitWithError prints the error via the formatter and exits with the correct code
func RenderTable ¶
RenderTable renders a table to the writer for rich mode
func TruncateString ¶
TruncateString truncates a string to maxLen and adds "..." if needed
Types ¶
type CLIError ¶
CLIError represents a structured error with exit code and optional hint
func NewCLIError ¶
NewCLIError creates a new CLIError
type Column ¶
type Column struct {
Name string // Display name
Key string // Struct field name or map key
Width int // Width for rich mode (0 = auto)
}
Column defines a column for table/list output
Click to show internal directories.
Click to hide internal directories.