root

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: Apache-2.0 Imports: 52 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(version string) *cobra.Command

Command builds the root cobra command for the given version using the compile-time registered provider list.

func IsJSONFlagActive

func IsJSONFlagActive() bool

IsJSONFlagActive reports whether the --json flag was actively set by the user on the command that was actually executed. Safe for concurrent use.

func ValidateArgs added in v0.2.4

func ValidateArgs(rootCmd *cobra.Command, args []string) error

ValidateArgs detects stray positional arguments on non-runnable group commands and converts them into a local unknown-command usage error.

The passed command tree may be mutated during validation because Cobra flag parsing updates flag state. Callers that will execute the command afterwards should validate against a separate command instance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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