summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorAlexander NeonXP Kiryukhin <i@neonxp.ru>2024-04-06 20:44:41 +0300
committerAlexander NeonXP Kiryukhin <i@neonxp.ru>2024-04-06 20:44:41 +0300
commitd97aec1586e805dec59ce5d2e45e451d71ba3af1 (patch)
treed3b7da7c8d1895792b3f78e45ca79dadd38e2749 /main.go
parent7908b1e119fe4fdc4a29130c950a9c7781f99081 (diff)
обновил либы
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,