errorx

package
v0.0.0-...-fefde71 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(status, code int, message string) error

New creates a new error with a code.

func Wrap

func Wrap(status, code int, err error) error

Wrap wraps an error with a code.

Types

type Error

type Error struct {
	StatusCode int   `json:"status_code"`
	Code       int   `json:"code"`
	Err        error `json:"error"`
}

Error is a custom error type.

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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