cmd

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDefaults

func AddDefaults(c *cobra.Command)

AddDefaults add standard additional flags and version information to a command

func Execute

func Execute(cmd *cobra.Command)

Execute wraps a command with error trapping that deals with the debug flag

func Test

func Test(cmd *cobra.Command) int

Test runs a command without calling os.Exit and instead returning the error code. Use this in place of Execute for functional testing

func Wrap

func Wrap(name string, src *cobra.Command)

Wrap creates a new command with the same functionality as src but with a new name and default options added for executables e.g. the --debug flag The new command is then executed

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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