validators

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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