middleware

package
v0.0.0-...-9776187 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotFoundHandler

func NotFoundHandler(w http.ResponseWriter, r *http.Request)

NotFoundHandler 404处理函数

Types

type RequestWare

type RequestWare struct{}

RequestWare request middleware.

func (*RequestWare) LogAccess

func (reqWare *RequestWare) LogAccess(h http.Handler) http.Handler

LogAccess access log.

func (*RequestWare) Recover

func (reqWare *RequestWare) Recover(h http.Handler) http.Handler

Recover当请求发生了异常或致命错误,需要捕捉r,w执行上下文的错误 该Recover设计灵感来源于golang gin框架的WriteHeaderNow()设计

Jump to

Keyboard shortcuts

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