failure

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package failure preserves error identity without rendering sensitive causes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

func Wrap(classification, cause error, operation string) error

Wrap returns a redacted classified error that remains compatible with errors.Is for both the classification and original cause.

Types

type Classified

type Classified struct {
	// contains filtered or unexported fields
}

Classified is a redacted error with a stable classification and hidden programmatic cause.

func (*Classified) Error

func (err *Classified) Error() string

Error deliberately excludes the underlying cause.

func (*Classified) Unwrap

func (err *Classified) Unwrap() []error

Unwrap exposes identities to errors.Is without exposing cause text.

Jump to

Keyboard shortcuts

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