package rest

import "net/http"

type Middeware = func(next http.Handler) http.Handler

func Use(handler http.Handler, middlewares ...Middeware) http.Handler {
	for _, middleware := range middlewares {
		handler = middleware(handler)
	}

	return handler
}
