errors

package
v0.0.0-...-24f16ac Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package errors exists to avoid some import cycles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EOption

type EOption func(EOpts) EOpts

EOption is an optional argument for E().

type EOpts

type EOpts struct {
	// SuppressTraceErr is an option to suppress the trace error.
	// This is useful on retries where you don't want to see the same error.
	SuppressTraceErr bool
	// CallNum is the number of calls to skip in the stack trace.
	CallNum int
	// StackTrace is an option to include the stack trace.
	StackTrace bool
	// Attrs are additional attributes to include in the error.
	Attrs []slog.Attr
	// LogLevel is the log level to use when logging this error. This defaults to slog.LevelError,
	// but can be overridden with WithLogLevel().
	LogLevel slog.Level
}

EOpts is the options for E(). Defaults are set by errors.E().

Jump to

Keyboard shortcuts

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