summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/main.go b/main.go
index 0ba6106..49abeb8 100644
--- a/main.go
+++ b/main.go
@@ -65,9 +65,11 @@ func main() {
mux.Handle("GET /static/", http.FileServerFS(staticFS))
logger := slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{}))
- h := middleware.Logger(mux, logger)
- h = middleware.Recover(h, logger)
- h = middleware.RequestID(h)
+ h := middleware.Use(mux,
+ middleware.Logger(logger),
+ middleware.Recover(logger),
+ middleware.RequestID,
+ )
srv := &http.Server{
Handler: h,