blob: 6610e2f86f5127bd2f8c31624db14fe0ab3f133c (
plain) (
tree)
|
|
package middleware
import "net/http"
type Middleware func(http.Handler) http.Handler
func Use(handler http.Handler, middlewares ...Middleware) http.Handler {
for _, h := range middlewares {
handler = h(handler)
}
return handler
}
|