Documentation ¶
Index ¶
- Variables
- func FlagErrorWrap(err error) error
- func FlagErrorf(format string, args ...interface{}) error
- func IsUserCancellation(err error) bool
- func MutuallyExclusive(message string, conditions ...bool) error
- func StringEnumFlag(cmd *cobra.Command, p *string, name, shorthand, defaultValue string, ...) *pflag.Flag
- type Factory
- type FlagError
- type NoResultsError
Constants ¶
This section is empty.
Variables ¶
View Source
var CancelError = errors.New("CancelError")
CancelError signals user-initiated cancellation
View Source
var SilentError = errors.New("SilentError")
SilentError is an error that triggers exit code 1 without any error messaging
Functions ¶
func FlagErrorWrap ¶
FlagError returns a new FlagError that wraps the specified error.
func FlagErrorf ¶
FlagErrorf returns a new FlagError that wraps an error produced by fmt.Errorf(format, args...).
func IsUserCancellation ¶
func MutuallyExclusive ¶
Types ¶
type Factory ¶
func NewFactory ¶ added in v0.1.0
func NewFactory() *Factory
func (*Factory) Executable ¶
Executable is the path to the currently invoked binary
type FlagError ¶
type FlagError struct {
// contains filtered or unexported fields
}
A *FlagError indicates an error processing command-line flags or other arguments. Such errors cause the application to display the usage message.
type NoResultsError ¶
type NoResultsError struct {
// contains filtered or unexported fields
}
func NewNoResultsError ¶
func NewNoResultsError(message string) NoResultsError
func (NoResultsError) Error ¶
func (e NoResultsError) Error() string
Click to show internal directories.
Click to hide internal directories.