errors

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Overview

Package errors has functions and structs to facilitade catch specifics errors thougth your program.

For example, use a BadRequest to sinalize a specific error to client

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(err string) error

func NewBadRequest

func NewBadRequest(err string) error

func NewInternalServerError

func NewInternalServerError(err string) error

func NewNotFound

func NewNotFound(err string) error

Types

type BadRequest

type BadRequest struct {
	Err error
}

func (BadRequest) Error

func (se BadRequest) Error() string

Satisfy the error interface.

type InternalServerError

type InternalServerError struct {
	Err error
}

func (InternalServerError) Error

func (se InternalServerError) Error() string

Satisfy the error interface.

type NotFound

type NotFound struct {
	Err error
}

func (NotFound) Error

func (se NotFound) Error() string

Satisfy the error interface.

Jump to

Keyboard shortcuts

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