cmdutil

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExactOneArgWithUsage

func ExactOneArgWithUsage() cobra.PositionalArgs

ExactOneArgWithUsage returns a cobra positional args validator that provides a descriptive error message when the required argument is missing. It extracts the argument name from the command's Use field (e.g., "get [NAMESPACE_NAME]" → "NAMESPACE_NAME").

func RequireFields

func RequireFields(cmd, resource string, fields map[string]string) error

RequireFields returns an error listing any fields whose value is empty, formatted as a user-facing message with a hint to run -h. fields maps flag name → current value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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