AFAIRE
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
790 B

/*
------------------------------------------------------------------------------------------------------------------------
####### kong ####### Copyright (c) 2021-2022 losyme ################################################ MIT License #######
------------------------------------------------------------------------------------------------------------------------
*/
package router
import "sync"
type Middleware func(HandlerFunc) HandlerFunc
type middlewares struct {
list []Middleware
}
var _msPool = &sync.Pool{
New: func() interface{} {
return new(middlewares)
},
}
func (m *middlewares) reset() *middlewares {
m.list = m.list[:0]
return m
}
/*
######################################################################################################## @(°_°)@ #######
*/