args

package
v0.1.0-beta.8 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NoArgs

func NoArgs(cmd *cobra.Command, args []string) error

func SingleArg

func SingleArg(argName string, validate func(value string) error) cobra.PositionalArgs

SingleArg checks if only one non-empty argument was provided and validates it using the validate function. It returns an error if none or multiple arguments are provided, or if the argument is invalid. For no validation, you can pass a nil validate function

Types

This section is empty.

Jump to

Keyboard shortcuts

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