Documentation ¶ Index ¶ func Handle(cmd *cobra.Command, err error) type ArgError func (e *ArgError) Error() string func (e *ArgError) Unwrap() error type FlagError func (e *FlagError) Error() string func (e *FlagError) Unwrap() error Examples ¶ Handle 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 Source Files ¶ View all Source files handler.go Click to show internal directories. Click to hide internal directories.