errchain

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package errchain keeps consistency of displaying error messages with more context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain interface {
	LinkF(format string, a ...any) error
	Link(msg string) error
}

Chain represents a helper that wraps an existing error and allows adding contextual messages while preserving the original error using Go's error wrapping.

func From

func From(err error) Chain

From creates a new errorChain rooted at the provided error so that additional context can be added in a consistent manner.

Jump to

Keyboard shortcuts

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