package middlewares import "net/http" type ContextKey string type MiddlewareFunc func(http.Handler) http.Handler func ChainMiddlewares(start http.Handler, middlewares ...MiddlewareFunc) http.Handler { next := start for _, h := range middlewares { next = h(next) } return next }