Init and optimizations

This commit is contained in:
2025-07-12 23:09:54 +02:00
parent 1a0b081e96
commit 77e4a2b6d1
11 changed files with 1061 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
package racc_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
}
}