commands

package
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToRootCommand

func AddToRootCommand(command *cobra.Command, opts ...commandOption)

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 InitialRootCommand(use, short, long string) *cobra.Command

func WithPersistentPostRunFunctions

func WithPersistentPostRunFunctions(functions ...func(cmd *cobra.Command, args []string)) commandOption

func WithRunFunctions

func WithRunFunctions(functions ...func(cmd *cobra.Command, args []string)) commandOption

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL