Documentation ¶
Index ¶
- Constants
- Variables
- func AddDebugFlag(fs *pflag.FlagSet)
- func AddProfileFlag(fs *pflag.FlagSet)
- func AddRegionFlag(fs *pflag.FlagSet)
- func AddStringFlag(cmd *cobra.Command, flagName string)
- func GetProfile() string
- func GetRegion() string
- func HasUnknownFlags() bool
- func IsValidMode(modes []string, mode string) bool
- func MarkRegionDeprecated(parentCmd *cobra.Command, childrenCmds []*cobra.Command)
- func NormalizeFlags(_ *pflag.FlagSet, name string) pflag.NormalizedName
- func ParseKnownFlags(cmd *cobra.Command, argv []string, failOnUnknown bool) error
- func ParseUnknownFlags(cmd *cobra.Command, argv []string) error
- func PreprocessUnknownFlagsWithId(cmd *cobra.Command, argv []string) error
Constants ¶
View Source
const ( DeprecatedDefaultMPLabelsFlag = "default-mp-labels" NewDefaultMPLabelsFlag = "worker-mp-labels" DeprecatedControlPlaneIAMRole = "controlplane-iam-role" NewControlPlaneIAMRole = "controlplane-iam-role-arn" DeprecatedWorkerIAMRole = "worker-iam-role" NewWorkerIAMRole = "worker-iam-role-arn" DeprecatedEnvFlag = "env" NewEnvFlag = "url" )
View Source
const MustUseBothFlagsErrorMessage = "Must supply '%s' flag when using the '%s' flag"
Variables ¶
View Source
var DisableRegionDeprecationFlagName = "disable-region-deprecation" // Temporary for region deprecation
View Source
var DisableRegionDeprecationWarning = false // Temporary for region deprecation
Functions ¶
func AddDebugFlag ¶
AddDebugFlag adds the '--debug' flag to the given set of command line flags.
func AddProfileFlag ¶
AddProfileFlag adds the '--profile' flag to the given set of command line flags.
func AddRegionFlag ¶ added in v0.1.10
AddRegionFlag adds the '--region' flag to the given set of command line flags.
func AddStringFlag ¶ added in v1.2.4
func GetProfile ¶ added in v0.1.10
func GetProfile() string
func HasUnknownFlags ¶ added in v1.0.0
func HasUnknownFlags() bool
HasUnknownFlags returns whether the flag parser detected any unknown flags
func IsValidMode ¶ added in v1.1.6
func MarkRegionDeprecated ¶ added in v1.2.39
func NormalizeFlags ¶ added in v1.2.35
func NormalizeFlags(_ *pflag.FlagSet, name string) pflag.NormalizedName
func ParseKnownFlags ¶ added in v1.2.4
Parse known flags will take the command line arguments and map the ones that fit with known flags.
func ParseUnknownFlags ¶ added in v1.0.0
ParseUnknownFlags parses all flags from the CLI, including unknown ones, and adds them to the current command tree
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.