sentinel

package
v0.0.0-...-c25eef7 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package sentinel provides some utilities for easier use of sentinel errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithMessage

func WithMessage(original error, sentinel error, context string) error

WithMessage annotates the original err with a sentinel error and a message.

func WithMessagef

func WithMessagef(original error, sentinel error, contextFormat string, args ...interface{}) error

WithMessagef annotates the original err with a sentinel error and a format specifier.

func Wrap

func Wrap(original error, sentinel error) error

Wrap annotates the original err with a sentinel error.

Types

type ErrorWrapper

type ErrorWrapper interface {
	OriginalError() error
}

ErrorWrapper wraps the original error.

Jump to

Keyboard shortcuts

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