cmd

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package cmd assembles slio's cobra command tree and owns the boundary between the CLI and the outside world: flag and profile resolution, the --timeout deadline every command runs under, and the mapping from a failure to an exit code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(args []string, stdin io.Reader, stdout, stderr io.Writer) int

Execute runs the root command against args and returns the process exit code. The arguments and the streams are parameters rather than the process ones so that a test can drive this same path: the exit code and the split between the streams are both part of slio's contract, and neither is observable from a test that only runs the command tree.

Nothing here catches SIGINT or SIGTERM. The Go default — terminate by the signal, print nothing — is what an interrupted run should do, so no error unwinds the stack and no failure report can be printed on that path; the property is structural rather than a branch that has to run first. The one place with work to do between the signal and the process ending arms its own guard around it (terminalGuard in auth.go).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL