errors

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Internal

func Internal(err error) error

Internal 内部错误

func New

func New(code int, detail string) error

New 常规业务逻辑错误

func Unauthorized

func Unauthorized(detail string) error

Unauthorized 未经授权错误

Types

type Error

type Error struct {
	Code   int    `json:"code"`
	Detail string `json:"detail"`
}

Error ...

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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