diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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, |