Documentation ¶
Index ¶
- func AddToRootCommand(command *cobra.Command, opts ...commandOption)
- func InitialRootCommand(use, short, long string) *cobra.Command
- func WithPersistentPostRunFunctions(functions ...func(cmd *cobra.Command, args []string)) commandOption
- func WithRunFunctions(functions ...func(cmd *cobra.Command, args []string)) commandOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddToRootCommand ¶
AddToRootCommand adds all commands and flags to the given root command. If you want to use the Run and PersistentPostRun functions, you need to add them using the WithRunFunctions and WithPersistentPostRunFunctions options. These functions are called after the internal toolconfig functions. Commands: * fav (Favourites) * fav list (List favourites) Flags: * --save <name> (Save favourite, persistent flag to use it on every sub command) * --run <name> (Run favourite)
func InitialRootCommand ¶
func WithRunFunctions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.