errors

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DoOrSkip

type DoOrSkip struct {
	// contains filtered or unexported fields
}

DoOrSkip executes given functions in order. If an error occurrs during execution, it skips

func (*DoOrSkip) DoOrSkip

func (d *DoOrSkip) DoOrSkip(do func() error)

DoOrSkip executes given functions in order. If an error occurrs during execution, it skips

func (*DoOrSkip) Err

func (d *DoOrSkip) Err() error

Err returns the error or nil.

type MultiLine

type MultiLine interface {
	error
	// Add an error.
	// If the error is nil, Add panics.
	Add(error)
	// AddIf add an error.
	// If the error is nil, do nothing.
	AddIfErr(error)
	// Len returns the count of errors
	Len() int
}

MultiLine represents multiple errors, prints line by line

func NewMultiLine

func NewMultiLine(errs ...error) MultiLine

NewMultiLine creates new MultiLine error by given error(s)

Jump to

Keyboard shortcuts

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