pipes

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package pipes provides generic erros for pipes to use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSkip

func IsSkip(err error) bool

IsSkip returns true if the error is an ErrSkip.

Types

type ErrSkip

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

ErrSkip occurs when a pipe is skipped for some reason.

func Skip

func Skip(reason string) ErrSkip

Skip skips this pipe with the given reason.

func (ErrSkip) Error

func (e ErrSkip) Error() string

Error implements the error interface. returns the reason the pipe was skipped.

type SkipMemento

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

SkipMemento remembers previous skip errors, so you can return them all at once later.

func (*SkipMemento) Evaluate

func (e *SkipMemento) Evaluate() error

Evaluate return a skip error with all previous skips, or nil if none happened.

func (*SkipMemento) Remember

func (e *SkipMemento) Remember(err error)

Remember a skip.

Jump to

Keyboard shortcuts

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