cmd

package
v1.0.3 Latest Latest
Warning

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

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

Documentation

Overview

Package cmd wires up cflio's cobra command tree.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() int

Execute runs the root command and returns the process exit code: 0 when it succeeded, 124 when the --timeout deadline expired, and 1 for every other failure. Those numbers are the contract a caller reads, so they are spelled out here rather than named. The error itself is printed rather than returned, since main has nothing left to do with it.

The code comes back from a function that returns normally because os.Exit skips deferred functions, so main can do nothing but pass it straight on.

Nothing here catches a signal: an interrupt ends the process through the Go default, so no error unwinds the stack and this never runs for one — an interrupted run has no exit code at all, only a termination status. The one place that does catch is the masked token read, where the terminal has to be put back first (see terminalGuard in auth.go).

The command context is left unset: cobra defaults a nil one to context.Background(), which is all commandContext needs to derive from.

Types

This section is empty.

Jump to

Keyboard shortcuts

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