Documentation ¶
Index ¶
- type Middleware
- type Router
- func (r *Router) Add(route string, method string, hfc handlerFunc)
- func (r *Router) AddMiddleware(m Middleware)
- func (r *Router) Close()
- func (r *Router) GET(route string, hfc handlerFunc)
- func (r *Router) POST(route string, hfc handlerFunc)
- func (r *Router) PUT(route string, hfc handlerFunc)
- func (r *Router) Run(addr string)
- func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware func(http.HandlerFunc) http.HandlerFunc
Middleware 自定义的中间件方法,入参出参均为http.HandlerFunc
Click to show internal directories.
Click to hide internal directories.