errors

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: GPL-3.0 Imports: 3 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(cond bool, msg string, args ...interface{})

func Panicf

func Panicf(msg string, args ...interface{})

func UnrecognizedMode

func UnrecognizedMode(got, name string) error

func Wrap

func Wrap(err1, err2 error) error

func WrapFmt

func WrapFmt(err error, msg string, args ...interface{}) error

Types

type Asserter

type Asserter string

func (Asserter) Check

func (a Asserter) Check(err error)

func (Asserter) Checkf

func (a Asserter) Checkf(err error, msg string, v ...interface{})

type Available

type Available struct {
	Name
	// contains filtered or unexported fields
}

func (*Available) Add

func (a *Available) Add(s string)

func (Available) NotFound

func (a Available) NotFound(requested string) (nf NotFound)

type Base

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

func (Base) Unwrap

func (e Base) Unwrap() error

func (*Base) Wrap

func (e *Base) Wrap(err error) (b *Base)

type Bound

type Bound int

func (Bound) IsOutOfBounds

func (b Bound) IsOutOfBounds(idx int) error

type EmptyStringError

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

func (EmptyStringError) Error

func (e EmptyStringError) Error() (s string)

func (EmptyStringError) Unwrap

func (e EmptyStringError) Unwrap() error

type KeyError

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

func KeyNotFound

func KeyNotFound(key string) (k KeyError)

func KeyNotFoundWith

func KeyNotFoundWith(key interface{}) (k KeyError)

func (KeyError) Error

func (e KeyError) Error() (s string)

type Mode

type Mode string

func (Mode) Error

func (m Mode) Error(got string) (err error)

type Name

type Name string

func (Name) NewAvailable

func (n Name) NewAvailable() (a Available)

type NotEmpty

type NotEmpty string

func (NotEmpty) Check

func (n NotEmpty) Check(variable string) (err error)

type NotFound

type NotFound struct {
	Available
	// contains filtered or unexported fields
}

func (NotFound) Error

func (e NotFound) Error() (s string)

type OutOfBoundError

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

func (OutOfBoundError) Error

func (o OutOfBoundError) Error() string

func (OutOfBoundError) Unwrap

func (o OutOfBoundError) Unwrap() error

type String

type String string

func (String) Error

func (e String) Error() (s string)

func (String) Wrap

func (e String) Wrap(err error) (Err error)

func (String) WrapFmt

func (e String) WrapFmt(err error, args ...interface{}) (Err error)

type Strings

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

func NewStrings

func NewStrings() (s Strings)

func NewStringsWithCap

func NewStringsWithCap(cap int) (s Strings)

func (*Strings) Add

func (s *Strings) Add(str string)

func (Strings) String

func (s Strings) String() (str string)

type UnrecognizedModeError

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

func (UnrecognizedModeError) Error

func (e UnrecognizedModeError) Error() string

func (UnrecognizedModeError) Unwrap

func (e UnrecognizedModeError) Unwrap() error

Jump to

Keyboard shortcuts

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