Help us shape the future of Go! Take the 2026 Go Developer Survey

errors

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrStacker

type ErrStacker interface {
	// Init the context so it can be used for stack.
	Init(ctx context.Context) context.Context
	// Wrap the error and put it in the error stack.
	Wrap(ctx context.Context, err error, errs ...error) error
	// Get the error stack.
	Get(ctx context.Context) interface{}
}

ErrStacker is error stack interface.

See usage example in example folder.

func New

func New() ErrStacker

New to create new error stack.

Directories

Path Synopsis
Package stack is an error wrapper and put it to a stack using passed context.
Package stack is an error wrapper and put it to a stack using passed context.

Jump to

Keyboard shortcuts

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