Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.
Click to show internal directories.
Click to hide internal directories.