validators

package
v1.6.9 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplicationIDExists

func ApplicationIDExists(cfg config.IConfig) func(appID interface{}) error

ApplicationIDExists validates that a string is a valid Application ID.

func AtLeastNArgs added in v1.3.0

func AtLeastNArgs(n int) cobra.PositionalArgs

AtLeastNArgs is a validator for commands to print an error with a custom message followed by usage, flags and available commands when too few argument(s) are provided

func ExactArgs

func ExactArgs(n int) cobra.PositionalArgs

ExactArgs is the same as ExactArgsWithMsg but displays a default error message

func ExactArgsWithMsg added in v1.2.1

func ExactArgsWithMsg(n int, msg string) cobra.PositionalArgs

ExactArgs is a validator for commands to print an error with a custom message followed by usage, flags and available commands when too few/much arguments are provided

func NoArgs

func NoArgs() cobra.PositionalArgs

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

func PathExists

func PathExists(input string) error

PathExists validates that a string is a path that exists.

func ProfileNameExists

func ProfileNameExists(cfg config.IConfig) func(profileName interface{}) error

ProfileNameExists validates that a string is a valid profile name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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