markers

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func If

func If(err error, pred func(err error) (interface{}, bool)) (interface{}, bool)

If returns a predicate's return value the first time the predicate returns true.

Note: if any of the error types has been migrated from a previous package location or a different type, ensure that RegisterTypeMigration() was called prior to If().

func Is

func Is(err, reference error) bool

Is determines whether one of the causes of the given error or any of its causes is equivalent to some reference error.

Note: if any of the error types has been migrated from a previous package location or a different type, ensure that RegisterTypeMigration() was called prior to Is().

func IsAny

func IsAny(err error, references ...error) bool

IsAny is like Is except that multiple references are compared.

Note: if any of the error types has been migrated from a previous package location or a different type, ensure that RegisterTypeMigration() was called prior to IsAny().

func Mark

func Mark(err error, reference error) error

Mark creates an explicit mark for the given error, using the same mark as some reference error.

Note: if any of the error types has been migrated from a previous package location or a different type, ensure that RegisterTypeMigration() was called prior to Mark().

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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