Documentation ¶
Index ¶
- func Check(err error)
- func CheckBoundedArgs(argBounds Bounds, args []string) error
- func CheckFixedArgs(numArgs int, args []string) error
- func ErrorAndExit(format string, args ...interface{})
- func Run(run func(args []string) error) func(*cobra.Command, []string)
- func RunBoundedArgs(argBounds Bounds, run func(args []string) error) func(*cobra.Command, []string)
- func RunFixedArgs(numArgs int, run func(args []string) error) func(*cobra.Command, []string)
- type Bounds
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBoundedArgs ¶
CheckBoundedArgs checks that the number of arguments is within the given Bounds.
func CheckFixedArgs ¶
CheckFixedArgs checks that the number of arguments equals numArgs.
func ErrorAndExit ¶
func ErrorAndExit(format string, args ...interface{})
ErrorAndExit errors with the given format and args, and then exits.
func Run ¶
Run makes a new cobra run function that wraps the given function.
func RunBoundedArgs ¶
RunBoundedArgs makes a new cobra run function that checks that the number of args is within argBounds.
Types ¶
Click to show internal directories.
Click to hide internal directories.