cmd

package
v1.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	GroupAnnotationLabel = "Group"
	StackGroup           = "Stack commands"
	TemplateGroup        = "Template commands"
)

Labels used as annotations on commands to provide grouping

Variables

Groups represents the ordering of commands in Rain's help text

StackAnnotation is used by rain sub-commands to register as commands in the stack group

TemplateAnnotation is used by rain sub-commands to register as commands in the template group

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