errors

package
v0.0.0-...-0864a4c Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: GPL-3.0 Imports: 0 Imported by: 8

Documentation

Index

Constants

View Source
const (
	NotFoundErrorCode    = 404
	InvalidFormErrorCode = 400
	ForbiddenErrorCode   = 403
)

Variables

This section is empty.

Functions

func Forbidden

func Forbidden(msg string) error

func InvalidForm

func InvalidForm(msg string) error

func IsBizError

func IsBizError(err error) bool

func IsForbidden

func IsForbidden(err error) bool

func IsInvalidForm

func IsInvalidForm(err error) bool

func IsNotFound

func IsNotFound(err error) bool

func NotFound

func NotFound(msg string) error

Types

type BizError

type BizError struct {
	Code int
	// contains filtered or unexported fields
}

func (*BizError) Error

func (f *BizError) Error() string

Jump to

Keyboard shortcuts

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