assert

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const AssertionErrorHint = `You have encountered an unexpected error.`

AssertionErrorHint is the hint emitted upon assertion failures.

Variables

This section is empty.

Functions

func HasAssertionFailure

func HasAssertionFailure(err error) bool

HasAssertionFailure returns true if the error or any of its causes is an assertion failure annotation.

func IsAssertionFailure

func IsAssertionFailure(err error) bool

IsAssertionFailure returns true if the error (not its causes) is an assertion failure annotation. Consider using markers.If or HasAssertionFailure to test both the error and its causes.

func WithAssertionFailure

func WithAssertionFailure(err error) error

WithAssertionFailure decorates the error with an assertion failure marker. This is not intended to be used directly (see AssertionFailed() for further decoration).

Detail is shown: - when formatting with `%+v`. - in Sentry reports.

Types

This section is empty.

Jump to

Keyboard shortcuts

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