clierror

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUsage is an error that is caused by an incorrect usage by the user.
	ErrUsage = errors.New("usage error")

	// ErrPipeline is an error that is caused by an action aborting a pipeline.
	ErrPipeline = errors.New("pipeline error")
)

Functions

func AsFlagUsageError

func AsFlagUsageError(flagName string, err error) error

AsFlagUsageError returns a flag ErrUsage with the given error.

func AsFlagUsageErrorf

func AsFlagUsageErrorf(flagName, format string, a ...interface{}) error

AsFlagUsageErrorf returns a flag ErrUsage with the given message.

func AsUsageError

func AsUsageError(err error) error

AsUsageError returns the given error wrapped in a ErrUsage.

func AsUsageErrorf

func AsUsageErrorf(format string, a ...interface{}) error

AsUsageErrorf returns a ErrUsage with the given format

func NewErrorHandler

func NewErrorHandler(logger logr.Logger) cli.ExitErrHandlerFunc

NewErrorHandler will print the CLI help and exit with code 2 if the given error is a ErrUsage.

Types

This section is empty.

Jump to

Keyboard shortcuts

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