errors

package
v1.0.86 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: BSD-2-Clause Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompoundError

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

CompoundError can contain one or more errors

func (*CompoundError) Add

func (this *CompoundError) Add(e ...error)

Add one or more errors onto the array of errors. If any error is a CoumpoundError, then add the errors individually

func (*CompoundError) Error

func (this *CompoundError) Error() string

Error satisfies the error interface

func (*CompoundError) ErrorOrSelf added in v1.0.22

func (this *CompoundError) ErrorOrSelf() error

ErrorOrSelf returns nil, the first error or self if there is more than one error

func (*CompoundError) One

func (this *CompoundError) One() error

One returns the first error if there is only one, or else returns nil

func (*CompoundError) Success

func (this *CompoundError) Success() bool

Success returns true if no errors appended

Jump to

Keyboard shortcuts

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