errors

package
v0.0.0-...-1b88e20 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func As

func As(err error, target interface{}) bool

func BadRequest

func BadRequest(message string) error

func GetCode

func GetCode(err error) int

func InternalServerError

func InternalServerError(message string) error

func Is

func Is(err, target error) bool

func Join

func Join(errs ...error) error

func New

func New(message string) error

func NewHttpError

func NewHttpError(code int, format string, args ...interface{}) error

func Newf

func Newf(format string, args ...interface{}) error

func NotFound

func NotFound(message string) error

func WithCode

func WithCode(code int, message string) error

func WithCodef

func WithCodef(code int, format string, args ...interface{}) error

func WithMessage

func WithMessage(err error, message string) error

func WithMessagef

func WithMessagef(err error, format string, args ...interface{}) error

func Wrap

func Wrap(err error, message string) error

func Wrapf

func Wrapf(err error, format string, args ...interface{}) error

Types

type Error

type Error interface {
	error
	Code() int
	Message() string
}

Jump to

Keyboard shortcuts

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