cmdutil

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SilenceErrorsEnv   = "COBRA_SILENCE_USAGE"
	StackTraceOnErrors = "COBRA_STACK_TRACE_ON_ERRORS"
)

Variables

View Source
var ExitOnError bool

ExitOnError if true, will cause commands to call os.Exit instead of returning an error. Used for skipping printing usage on failure.

View Source
var StackOnError bool

StackOnError if true, will print a stack trace on failure.

Functions

func FixDocs

func FixDocs(old, new string, c *cobra.Command)

FixDocs replaces instances of old with new in the docs for c

func HandleError

func HandleError(c *cobra.Command, err error) error

func HandlePreRunError

func HandlePreRunError(c *cobra.Command, err error) error

func SetSilenceErrors

func SetSilenceErrors(c *cobra.Command)

Types

This section is empty.

Jump to

Keyboard shortcuts

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