errors

package
v2.282.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package errors provides small error helpers used across go-service.

This package mostly re-exports standard library error helpers and adds convenience helpers such as Prefix for wrapping errors with a component prefix.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func As added in v2.14.0

func As(err error, target any) bool

As is an alias for errors.As.

func Is added in v2.14.0

func Is(err, target error) bool

Is is an alias for errors.Is.

func Join added in v2.14.0

func Join(errs ...error) error

Join is an alias for errors.Join.

func New added in v2.14.0

func New(text string) error

New is an alias for errors.New.

func Prefix

func Prefix(prefix string, err error) error

Prefix wraps err with prefix using fmt.Errorf("%v: %w", prefix, err).

If err is nil, Prefix returns nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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