Documentation
¶
Index ¶
- Variables
- func CapitalizeFlagDescriptions(f *pflag.FlagSet) string
- func CheckOutputFlag(outputFlag string) error
- func GetFullName(parentName, name string) string
- func LogErrorAndExit(err error, context string, a ...interface{})
- func PrintComponentInfo(client *occlient.Client, currentComponentName string, ...)
- func VisitCommands(cmd *cobra.Command, f func(*cobra.Command))
Constants ¶
This section is empty.
Variables ¶
var CmdUsageTemplate = `` /* 978-byte string literal not displayed */
CmdUsageTemplate is the main template used for all command line usage
Functions ¶
func CapitalizeFlagDescriptions ¶
CapitalizeFlagDescriptions adds capitalizations
func CheckOutputFlag ¶
CheckOutputFlag validates the -o flag
func GetFullName ¶
GetFullName generates a command's full name based on its parent's full name and its own name
func LogErrorAndExit ¶
LogErrorAndExit prints the cause of the given error and exits the code with an exit code of 1. If the context is provided, then that is printed, if not, then the cause is detected using errors.Cause(err)
func PrintComponentInfo ¶
func PrintComponentInfo(client *occlient.Client, currentComponentName string, componentDesc component.Component, applicationName string)
PrintComponentInfo prints Component Information like path, URL & storage
func VisitCommands ¶
VisitCommands visits each command within Cobra. Adapted from: https://github.com/cppforlife/knctl/blob/612840d3c9729b1c57b20ca0450acab0d6eceeeb/pkg/knctl/cobrautil/misc.go#L23
Types ¶
This section is empty.