Documentation
¶
Overview ¶
Package ui carries the CLI's output conventions, matching the bash implementation's verbose.sh helpers byte for byte so ported commands stay indistinguishable from their argsh originals.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrHandled = errors.New("handled")
ErrHandled marks an error whose message was already printed in the bash implementation's own format ([error] … on stderr). It is the ONE sentinel: every package's name for it (cli.ErrHandled, kubehz.ErrHandled, secrets.ErrHandled, …) is this value, so errors.Is holds across package boundaries and a %w wrap anywhere still reads as handled. The caller exits non-zero without printing anything further.
Functions ¶
func Handled ¶
Handled marks err as already printed: the returned error reads as ErrHandled to errors.Is, keeps err's text, and unwraps to err so any sentinel or type inside it still matches. A site that prints its own [error] line and then returns an error wraps it here, and the exit mapping at the top (cli dispatchExit) prints nothing more. An error that reaches the top WITHOUT this mark was never printed, so the mapping prints it. nil stays nil.
Types ¶
This section is empty.