cli

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package cli wires up the cobra command tree for the nelmwave binary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() int

Execute runs the root command with a context cancelled on SIGINT/SIGTERM, giving in-flight work a chance to stop gracefully. It returns the process exit code.

func ExitCode

func ExitCode(err error) int

ExitCode maps an error returned by a command to the exit code Execute would report for it: 0 for nil, the carried code for a signalling error (2 from diff --detailed-exitcode), 1 for anything else. Callers embedding the command tree — the end-to-end suite, or another binary — need this to tell "changes are planned" apart from "the command failed".

func NewRootCommand

func NewRootCommand() *cobra.Command

NewRootCommand builds the root `nelmwave` command with all subcommands attached, using a fresh set of global options. Useful for tests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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