const ( // PlatformFlagName is the name of the flag allowing user to specify target platform PlatformFlagName = "platform" PlatformCluster = "cluster" PlatformPodman = "podman" PlatformDefault = PlatformCluster )
const ( VarFileFlagName = "var-file" VarFlagName = "var" )
const ( // OutputFlagName is the name of the flag allowing user to specify output format OutputFlagName = "o" )
func AddOutputFlag()
AddOutputFlag adds the machine readable output flag to all commands We use "flag" in order to make this accessible throughtout ALL of odo, rather than the above traditional "persistentflags" usage that does not make it a pointer within the 'pflag' package
func AddPlatformFlag(ctx context.Context)
AddPlatformFlag adds the --platform output flag to all commands We use "flag" in order to make this accessible throughtout ALL of odo, rather than the above traditional "persistentflags" usage that does not make it a pointer within the 'pflag' package
func AddVariablesFlags()
AddVariablesFlags adds the --var-file and --var flags to all commands We use "flag" in order to make this accessible throughtout ALL of odo, rather than the above traditional "persistentflags" usage that does not make it a pointer within the 'pflag' package
func CheckMachineReadableOutputCommand(envconfig *config.Configuration, cmd *cobra.Command) error
CheckMachineReadableOutputCommand performs machine-readable output functions required to have it work correctly
func CheckPlatformCommand(cmd *cobra.Command) error
CheckPlatformCommand checks if commands enabling platform flag are used correctly
func CheckVariablesCommand(cmd *cobra.Command) error
CheckVariablesCommand checks if commands enabling --var-file and --var flags are used correctly
func GetJsonOutputValue(cmd cmdline.Cmdline) bool
GetJsonOutputValue returns true if -o flag is used and value is "json"
func GetPlatformValue(cmd cmdline.Cmdline) string
GetPlatformValue returns value of --platform flag or default value
func GetVariablesValues(cmd cmdline.Cmdline) (map[string]string, error)
GetVariablesValues returns variables computed from --var-file and --var values
func UseOutputFlag(cmd *cobra.Command)
UseOutputFlag indicates that a command accepts the -o flag
func UsePlatformFlag(cmd *cobra.Command)
UsePlatformFlag indicates that a command accepts the --platform flag
func UseVariablesFlags(cmd *cobra.Command)
UseVariablesFlags indicates that a command accepts the --var-file and --var flags