errors

package
v2.30.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(msg string) error

func WithStack

func WithStack(err error) error

func Wrap

func Wrap(err error, msg string) error

Types

type Error

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

func (*Error) Error

func (e *Error) Error() string

func (*Error) Format

func (e *Error) Format(s fmt.State, verb rune)

func (*Error) Unwrap

func (e *Error) Unwrap() error

type Frame

type Frame uintptr

func Stack

func Stack(err error) []Frame

func (Frame) File added in v2.28.0

func (f Frame) File() string

func (Frame) Format

func (f Frame) Format(s fmt.State, verb rune)

Format implements fmt.Formatter. Supported verbs:

%v  - short file:line
%+v - full file:line with function name
%s  - file:line
%n  - function name only

func (Frame) Function added in v2.28.0

func (f Frame) Function() string

func (Frame) Line added in v2.28.0

func (f Frame) Line() int

Jump to

Keyboard shortcuts

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