This commit is contained in:
DeveloperDurp 2024-09-02 13:43:01 -05:00
parent 35fa88b45b
commit 9f6d8ac621
13 changed files with 3 additions and 4 deletions

View file

@ -1,16 +0,0 @@
package middleware
import "net/http"
type Middleware func(http.Handler) http.Handler
func CreateStack(xs ...Middleware) Middleware {
return func(next http.Handler) http.Handler {
for i := len(xs) - 1; i >= 0; i-- {
x := xs[i]
next = x(next)
}
return next
}
}