validators

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExactArgs

func ExactArgs(expected ...string) cobra.PositionalArgs

ExactArgs is a validator for commands to print an error when number of expected args are different from the number of passed args. The names passed in to `expected` are used for the help message.

func MaximumNArgs

func MaximumNArgs(num int) cobra.PositionalArgs

MaximumNArgs is a validator for commands to print an error when the provided args are greater than the maximum amount

func NoArgs

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

NoArgs is a validator for commands to print an error when an argument is provided

Types

This section is empty.

Jump to

Keyboard shortcuts

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