Documentation ¶
Overview ¶
Package flags is a helper package for processing and interactive command line flags
Index ¶
- Variables
- func EnableOutputFlagCompletion(cmd *cobra.Command)
- func EnableStaticFlagCompletion(cmd *cobra.Command, flagName string, validValues []string)
- func FlagDescription(localizer localize.Localizer, messageID string, validOptions ...string) string
- func IsValidInput(input string, validValues ...string) bool
- func RegisterServiceAccountCompletionFunc(cmd *cobra.Command, flagName string, connFunc factory.ConnectionFunc) error
- func RegisterUserCompletionFunc(cmd *cobra.Command, flagName string, connFunc factory.ConnectionFunc) error
- type FlagSet
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ValidOutputFormats = []string{dump.JSONFormat, dump.YAMLFormat, dump.YMLFormat} CredentialsOutputFormats = []string{credentials.EnvFormat, credentials.JSONFormat, credentials.PropertiesFormat} )
Functions ¶
func EnableOutputFlagCompletion ¶
EnableOutputFlagCompletion enables autocompletion for output flag
func EnableStaticFlagCompletion ¶
EnableStaticFlagCompletion enables autocompletion for flags with predefined valid values
func FlagDescription ¶ added in v0.34.2
FlagDescription creates a flag description and adds a list of valid options (if any)
func IsValidInput ¶
IsValidInput checks if the input value is in the range of valid values
func RegisterServiceAccountCompletionFunc ¶ added in v0.34.2
func RegisterServiceAccountCompletionFunc(cmd *cobra.Command, flagName string, connFunc factory.ConnectionFunc) error
RegisterNameFlagCompletionFunc adds the user list to flag dynamic completion
func RegisterUserCompletionFunc ¶ added in v0.34.2
func RegisterUserCompletionFunc(cmd *cobra.Command, flagName string, connFunc factory.ConnectionFunc) error
RegisterUserCompletionFunc adds the user list to flag dynamic completion
Types ¶
Click to show internal directories.
Click to hide internal directories.