Documentation
¶
Index ¶
Constants ¶
View Source
const ( ODPF_CONFIG_DIR = "ODPF_CONFIG_DIR" XDG_CONFIG_HOME = "XDG_CONFIG_HOME" APP_DATA = "AppData" LOCAL_APP_DATA = "LocalAppData" )
View Source
const ( USAGE = "Usage" CORECMD = "Core commands" HELPCMD = "Help topics" OTHERCMD = "Other commands" FLAGS = "Flags" IFLAGS = "Inherited flags" ARGUMENTS = "Arguments" EXAMPLES = "Examples" ENVS = "Environment variables" LEARN = "Learn more" FEEDBACK = "Feedback" )
Variables ¶
This section is empty.
Functions ¶
func IsCmdErr ¶
IsCmdErr returns true if erorr is cobra command error. This is useful for distinguishing between a human error and a program error and displaying the correct message.
func SetCompletionCmd ¶
SetCompletionCmd is used to generate the completion script in bash, zsh, fish, and powershell. It should be added on the root command and can be used as `completion bash` or `completion zsh`.
func SetHelp ¶
SetHelp sets a custom help and usage function. It allows to group commands in different sections based on cobra commands annotations.
func SetHelpTopicCmd ¶
SetHelpTopicCmd sets the help topic command. This should be added on the root command. e.g.
topic := map[string]string{"short": "Env","long": "Environment","example": "example",}
Types ¶
Click to show internal directories.
Click to hide internal directories.