errors

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 2 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Is added in v1.1.3

func Is(err error, target error) bool

func WithMessage added in v1.1.0

func WithMessage(err error, message string) error

Types

type Error

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

func Convert added in v1.1.0

func Convert(err error) *Error

func Forbidden

func Forbidden(format string, args ...interface{}) *Error

func InternalServer

func InternalServer(format string, args ...interface{}) *Error

func InvalidParam added in v1.1.0

func InvalidParam(format string, args ...interface{}) *Error

func New

func New(code int, msg string) *Error

func NotFound

func NotFound(format string, args ...interface{}) *Error

func Timeout

func Timeout(format string, args ...interface{}) *Error

func Unauthorized

func Unauthorized(format string, args ...interface{}) *Error

func Unknown added in v1.1.0

func Unknown(format string, args ...interface{}) *Error

func (Error) Code

func (err Error) Code() int

func (Error) Error

func (err Error) Error() string

func (Error) Message

func (err Error) Message() string

func (*Error) WithMessage added in v1.1.0

func (err *Error) WithMessage(message string) *Error

type Frame added in v1.1.3

type Frame uintptr

Frame represents a program counter inside a stack frame.

Jump to

Keyboard shortcuts

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