errors

package
v0.0.0-...-9dc46f7 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 5 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Errorf = fmt.Errorf

Re-exports fmt.Errorf from standard library.

Re-exports errors.Is from standard library.

Re-exports errors.Join from standard library.

Functions

func GetTags

func GetTags(err error) []string

Scans all wrapped tags in an error.

func SerializeTags

func SerializeTags(err error) string

Serializes the tags in an error to a single string of constant (known at compile time) cardinality.

func Tag

func Tag(tag string, err error) error

Attaches a tag to an error.

A tag should be a string literal that describes the current function path concisely. It is used for reporting error type in metrics, so a small cardinality is expected.

func TagErrorf

func TagErrorf(tag string, format string, args ...any) error

Shorthand for Errorf + Tag.

func TagWrapf

func TagWrapf(tag string, err error, format string, args ...any) error

Shorthand for Wrapf + Tag.

func Wrapf

func Wrapf(err error, format string, args ...any) error

Wraps an error with context information in the message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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