Documentation ¶
Index ¶
- Variables
- func CastValueError(v interface{}, t string) error
- func EnableStaticFlagCompletion(cmd *cobra.Command, flagName string, validValues []string)
- func InvalidValueError(flag string, val interface{}, validOptions ...string) error
- func IsValidInput(input string, validValues ...string) bool
- func RequiredValueError(arg string) error
- func ValidateName(val interface{}, validRegexpString string, minLength, maxLength int) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ValidOutputFormats stores a default set of possible valid output formats ValidOutputFormats = []string{"json", "yml", "yaml", "toml"} // CredentialsOutputFormats stores a default set of possible valid credential output formats CredentialsOutputFormats = []string{"env", "json", "properties"} )
Functions ¶
func CastValueError ¶
CastValueError returns an error when a value cannot be casted to the given type
func EnableStaticFlagCompletion ¶
EnableStaticFlagCompletion enables autocompletion for flags with predefined valid values
func InvalidValueError ¶
InvalidValueError returns an error when an invalid flag value is provided
func IsValidInput ¶
IsValidInput checks if the input value is in the range of valid values
func RequiredValueError ¶
RequiredValueError returns an error when a required value is not provided
func ValidateName ¶
ValidateName validates the proposed name of an instance
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.