rferrors

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Code400 = -400 // bad request
	Code404 = -404 // not found
	Code500 = -500 // internal server error

	CodeSuc   = 0  // success
	CodeError = -1 // error

)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiError

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

errorString is a trivial implementation of error.

func New

func New(message string, code int) *ApiError

func (*ApiError) Code

func (e *ApiError) Code() int

func (*ApiError) Error

func (e *ApiError) Error() string

Jump to

Keyboard shortcuts

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