Documentation
¶
Overview ¶
Package cli wires Cobra commands to sqio services and terminal I/O.
Index ¶
Constants ¶
View Source
const ( // ExitSuccess indicates successful command completion. ExitSuccess = 0 // ExitInternal indicates an internal, configuration, input, or output error. ExitInternal = 1 // ExitSQLSyntax indicates rejected SQL or lint issues. ExitSQLSyntax = 2 // ExitConnection indicates database connection setup failure. ExitConnection = 3 // ExitTimeout indicates command execution exceeded its timeout. ExitTimeout = 4 // ExitCancelled indicates command execution was cancelled by the user. ExitCancelled = 5 )
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute() error
Execute builds and runs the root command with signal-aware context handling.
func StructuredError ¶
StructuredError formats err as a compact JSON object for stderr output.
Types ¶
type CommandError ¶
CommandError carries a machine-readable error type and process exit code.
func (*CommandError) Error ¶
func (e *CommandError) Error() string
Error returns the user-facing error message.
Click to show internal directories.
Click to hide internal directories.