first commit

This commit is contained in:
2024-11-19 23:17:14 +01:00
commit 527344b220
12 changed files with 374 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
package main
import (
"log/slog"
"net/http"
)
func someMiddleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
slog.Info("triggered middleware")
next.ServeHTTP(w, r)
})
}
func anotherMiddleware(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
slog.Info("triggered another middleware")
next.ServeHTTP(w, r)
})
}