Documentation
¶
Overview ¶
Package cli implements the sonde command line: cobra commands, flag mapping and output wiring. It returns exit codes and never exits itself.
Index ¶
Constants ¶
const ( ExitOK = 0 // success ExitUsage = 1 // CLI usage / option error ExitParse = 2 // input file parse error (also unreadable input file) ExitRuntime = 3 // runtime error: connect, TLS, timeout, sandbox denial, unsupported option ExitAssert = 4 // assert / contract failure ExitUndefined = 127 // undefined error, e.g. a report cannot be written ExitInterrupted = 130 // interrupted (Ctrl-C) )
Process exit codes (docs/architecture.md §5), including the documented ExitInterrupted.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute() int
Execute runs sonde with the process arguments and returns the exit code. Ctrl-C is two-stage, matching the upstream CLI: the first SIGINT stops scheduling new files and lets running ones finish their current entry; if a second SIGINT arrives, or ctrlCGrace elapses first, in-flight requests are aborted too. Either way the run then exits 130.
Types ¶
type ExitError ¶
ExitError attaches a process exit code to an error. Commands wrap every error that must not map to ExitUsage.
func NewExitError ¶
NewExitError wraps err with the given exit code.
Source Files
¶
- build_options.go
- check.go
- cli_reference.go
- error_format.go
- errors.go
- exit_code.go
- export.go
- fmt.go
- glob.go
- import.go
- import_curl.go
- import_http.go
- import_openapi.go
- import_opencollection.go
- import_postman.go
- input.go
- logger.go
- lsp.go
- mcp.go
- mock.go
- openapi_flags.go
- output.go
- precedence.go
- pretty.go
- progress.go
- root.go
- run.go
- run_options.go
- version.go