errors

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(cmd *cobra.Command, err error)
Example
cmd := &cobra.Command{}
err := &FlagError{Err: errors.New("something wrong")}

Handle(cmd, err)
Output:
something wrong

Usage:

Types

type ArgError

type ArgError struct {
	Err error
}

func (*ArgError) Error

func (e *ArgError) Error() string

func (*ArgError) Unwrap

func (e *ArgError) Unwrap() error

type FlagError

type FlagError struct {
	Err error
}

func (*FlagError) Error

func (e *FlagError) Error() string

func (*FlagError) Unwrap

func (e *FlagError) Unwrap() error

Jump to

Keyboard shortcuts

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