From 20b9ab47c59c4844a5bdc783b23bad481de1fa85 Mon Sep 17 00:00:00 2001 From: 1e99 Date: Sat, 9 Nov 2024 12:59:42 +0100 Subject: [PATCH] remove middlewars package --- main.go | 3 +-- {middlewares => routes}/logger.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) rename {middlewares => routes}/logger.go (92%) diff --git a/main.go b/main.go index 87458d2..ae9844b 100644 --- a/main.go +++ b/main.go @@ -8,7 +8,6 @@ import ( "time" "git.1e99.eu/1e99/passed/config" - "git.1e99.eu/1e99/passed/middlewares" "git.1e99.eu/1e99/passed/routes" "git.1e99.eu/1e99/passed/storage" ) @@ -38,7 +37,7 @@ func run() error { mux.Handle("HEAD /api/password/{id}", routes.HasPassword(store)) if logRequests { - handler = middlewares.Logger(handler) + handler = routes.Logger(handler) } log.Printf("Listening on %s.", address) diff --git a/middlewares/logger.go b/routes/logger.go similarity index 92% rename from middlewares/logger.go rename to routes/logger.go index 32edd68..44b3a42 100644 --- a/middlewares/logger.go +++ b/routes/logger.go @@ -1,4 +1,4 @@ -package middlewares +package routes import ( "log"