util

package
Version: v3.6.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: LGPL-3.0 Imports: 6 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseRequest

func CloseRequest(req *http.Request)

func CloseResponse

func CloseResponse(res *http.Response)

Types

type APIHandleError

type APIHandleError struct {
	Code int
	Err  error
}

APIHandleError handle create err for api

func CreateAPIHandleError

func CreateAPIHandleError(code int, err error) *APIHandleError

CreateAPIHandleError create APIHandleError

func CreateAPIHandleErrorFromDBError

func CreateAPIHandleErrorFromDBError(msg string, err error) *APIHandleError

CreateAPIHandleErrorFromDBError from db error create APIHandleError

func CreateAPIHandleErrorf

func CreateAPIHandleErrorf(code int, format string, args ...interface{}) *APIHandleError

CreateAPIHandleErrorf create handle error

func (*APIHandleError) Error

func (a *APIHandleError) Error() string

func (*APIHandleError) Handle

func (a *APIHandleError) Handle(r *http.Request, w http.ResponseWriter)

Handle 处理

func (*APIHandleError) String

func (a *APIHandleError) String() string

Jump to

Keyboard shortcuts

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