serror

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 0 Imported by: 0

README

Status Error

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Text string `json:"error"`
	Code int    `json:"-"`
}

Error represents a status error.

func BadRequest

func BadRequest(text string) *Error

BadRequest returns a new bad request error.

func Internal

func Internal(text string) *Error

Internal returns a new internal server error.

func New

func New(text string, code int) *Error

New returns a new error.

func (*Error) Error

func (e *Error) Error() string

Error implement error interface.

Jump to

Keyboard shortcuts

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