v0.0.0-...-381c4e2 Latest Latest

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 13 Imported by: 0




View Source
const (
	P0 = Priority(iota)


View Source
var (
	ErrStopIteration = New("stop iteration")
	ErrFalse         = New("false")
	ErrTrue          = New("true")
View Source
var New = errors.New


func As

func As(err error, target any) bool

func Deferred

func Deferred(
	err *error,
	ef func() error,

func DeferredChan

func DeferredChan(
	ch chan<- error,
	f func() error,

func DeferredChanError

func DeferredChanError(
	err *error,
	ch <-chan error,

func DeferredCloseAndRename

func DeferredCloseAndRename(err *error, c io.Closer, oldpath, newpath string)

func DeferredCloser

func DeferredCloser(
	err *error,
	c io.Closer,

func DeferredFlusher

func DeferredFlusher(
	err *error,
	f Flusher,

func Errf

func Errf(f string, a ...interface{})

func Error

func Error(err error)

func Errorf

func Errorf(f string, values ...interface{}) (err errer)

func Implement

func Implement() (err error)

func Is

func Is(err, target error) bool

func IsAsNilOrWrapf

func IsAsNilOrWrapf(
	err error,
	target error,
	format string,
	values ...interface{},
) (out error)

func IsBrokenPipe

func IsBrokenPipe(err error) bool

func IsEOF

func IsEOF(err error) bool

func IsErrFalse

func IsErrFalse(err error) bool

func IsErrTrue

func IsErrTrue(err error) bool

func IsErrno

func IsErrno(err error, target syscall.Errno) (ok bool)

func IsExist

func IsExist(err error) bool

func IsNotExist

func IsNotExist(err error) bool

func IsNotNilAndNotEOF

func IsNotNilAndNotEOF(err error) bool

func IsStopIteration

func IsStopIteration(err error) bool

func IsTooManyOpenFiles

func IsTooManyOpenFiles(err error) bool

func IsVerbose

func IsVerbose() bool

func Join

func Join(es ...error) error

func MakeErrStopIteration

func MakeErrStopIteration() error

func MakeMulti

func MakeMulti(errs ...error) (em *multi)

func Normal

func Normal(err error) *normalError

func Normalf

func Normalf(fmt string, args ...interface{}) *normalError

func PanicIfError

func PanicIfError(err interface{})

func PrintErr

func PrintErr(a ...interface{}) (err error)

func PrintErrf

func PrintErrf(f string, a ...interface{}) (err error)

func SetTesting

func SetTesting()

func SetTodoOn

func SetTodoOn()

func SetVerbose

func SetVerbose()

func Split

func Split(err error) (out []error)

func Todo

func Todo(f string, a ...interface{}) (err error)

func TodoP0

func TodoP0(f string, a ...interface{}) (err error)

func TodoP1

func TodoP1(f string, a ...interface{}) (err error)

func TodoP2

func TodoP2(f string, a ...interface{}) (err error)

func TodoP3

func TodoP3(f string, a ...interface{}) (err error)

func TodoP4

func TodoP4(f string, a ...interface{}) (err error)

func TodoP5

func TodoP5(f string, a ...interface{}) (err error)

func TodoRecoverable

func TodoRecoverable(f string, a ...interface{}) (err error)

func Unwrap

func Unwrap(err error) error

func Wrap

func Wrap(in error) (err error)

func WrapExcept

func WrapExcept(in error, except ...error) (err error)

func WrapExceptAsNil

func WrapExceptAsNil(in error, except ...error) (err error)

func WrapN

func WrapN(n int, in error) (err error)

func Wrapf

func Wrapf(in error, f string, values ...interface{}) (err error)


type DevPrinter

type DevPrinter interface {
	Caller(i int, vs ...interface{})
	FunctionName(skip int)

func Debug

func Debug() DevPrinter

func Log

func Log() DevPrinter

type Flusher

type Flusher interface {
	Flush() error

type FlusherWithLogger

type FlusherWithLogger interface {
	Flush(schnittstellen.FuncIter[string]) error

type Iser

type Iser interface {
	Is(error) bool

type Logger

type Logger interface {
	Print(v ...interface{})
	Printf(format string, v ...interface{})

type Multi

type Multi interface {
	Empty() bool
	GetMultiError() Multi
	GetError() error

type Priority

type Priority int

func (Priority) String

func (i Priority) String() string

type ProdPrinter

type ProdPrinter interface {
	Print(v ...interface{}) error
	Printf(format string, v ...interface{}) error

func Err

func Err() ProdPrinter

func Out

func Out() ProdPrinter

type StackInfo

type StackInfo struct {
	// contains filtered or unexported fields

func MakeStackInfo

func MakeStackInfo(skip int) (si StackInfo, ok bool)

func MakeStackInfoFromFrame

func MakeStackInfoFromFrame(frame runtime.Frame) (si StackInfo)

func MakeStackInfos

func MakeStackInfos(depth, count int) (si []StackInfo)

func (StackInfo) Errorf

func (si StackInfo) Errorf(f string, values ...interface{}) (err errer)

func (StackInfo) String

func (si StackInfo) String() string

func (StackInfo) Wrap

func (si StackInfo) Wrap(in error) (err errer)

func (StackInfo) Wrapf

func (si StackInfo) Wrapf(in error, f string, values ...interface{}) (err errer)

type StackTracer

type StackTracer interface {
	ShouldShowStackTrace() bool

type Unwrapper

type Unwrapper interface {
	Unwrap() error

Jump to

Keyboard shortcuts

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