diff options
author | Alexander Neonxp Kiryukhin <i@neonxp.ru> | 2024-12-11 01:52:13 +0300 |
---|---|---|
committer | Alexander Neonxp Kiryukhin <i@neonxp.ru> | 2024-12-11 01:52:13 +0300 |
commit | 7e304bcd9ec014c628663b2ca6e9a610cb7a27e2 (patch) | |
tree | 3a1d09fc184131b2eef9b7dccc50dc5d734e55f8 | |
parent | a5db15c571e786ed6c7dbd47e515c4ec368020c8 (diff) |
-rw-r--r-- | go.mod | 5 | ||||
-rw-r--r-- | go.sum | 4 | ||||
-rw-r--r-- | handler.go | 3 | ||||
-rw-r--r-- | middleware/basic_auth.go | 2 | ||||
-rw-r--r-- | middleware/logger.go | 2 | ||||
-rw-r--r-- | middleware/recover.go | 2 | ||||
-rw-r--r-- | middleware/request_id.go | 4 |
7 files changed, 10 insertions, 12 deletions
@@ -1,7 +1,6 @@ -module go.neonxp.ru/mux +module neonxp.ru/go/mux go 1.22.5 -require go.neonxp.ru/objectid v0.0.2 +require neonxp.ru/go/objectid v0.0.2 -replace go.neonxp.ru/mux latest => neonxp.ru/go/mux latest @@ -1,2 +1,2 @@ -go.neonxp.ru/objectid v0.0.2 h1:Z/G6zvBxmUq0NTq681oGH8pTbBWwi6VA22YOYludIPs= -go.neonxp.ru/objectid v0.0.2/go.mod h1:s0dRi//oe1liiKcor1KmWx09WzkD6Wtww8ZaIv+VLBs= +neonxp.ru/go/objectid v0.0.2 h1:Z/G6zvBxmUq0NTq681oGH8pTbBWwi6VA22YOYludIPs= +neonxp.ru/go/objectid v0.0.2/go.mod h1:s0dRi//oe1liiKcor1KmWx09WzkD6Wtww8ZaIv+VLBs= @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "go.neonxp.ru/mux/ctxlib" + "neonxp.ru/go/mux/ctxlib" ) // Handler API handler and returns standard http.HandlerFunc function @@ -56,7 +56,6 @@ func Handler[RQ any, RS any](handler func(ctx context.Context, request *RQ) (RS, w.WriteHeader(statusCode) w.Header().Set("Content-Type", contentType) w.Write(body) - } } diff --git a/middleware/basic_auth.go b/middleware/basic_auth.go index 847ee79..fe2b254 100644 --- a/middleware/basic_auth.go +++ b/middleware/basic_auth.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "go.neonxp.ru/mux" + "neonxp.ru/go/mux" ) const basicAuthScheme = "Basic" diff --git a/middleware/logger.go b/middleware/logger.go index 80117da..4af031a 100644 --- a/middleware/logger.go +++ b/middleware/logger.go @@ -5,7 +5,7 @@ import ( "net/http" "time" - "go.neonxp.ru/mux" + "neonxp.ru/go/mux" ) type wrappedResponse struct { diff --git a/middleware/recover.go b/middleware/recover.go index b34d582..ac4f893 100644 --- a/middleware/recover.go +++ b/middleware/recover.go @@ -4,7 +4,7 @@ import ( "log/slog" "net/http" - "go.neonxp.ru/mux" + "neonxp.ru/go/mux" ) func Recover(logger *slog.Logger) mux.Middleware { diff --git a/middleware/request_id.go b/middleware/request_id.go index feb5afa..9a49239 100644 --- a/middleware/request_id.go +++ b/middleware/request_id.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "go.neonxp.ru/mux/ctxlib" - "go.neonxp.ru/objectid" + "neonxp.ru/go/mux/ctxlib" + "neonxp.ru/go/objectid" ) const RequestIDHeader string = "X-Request-ID" |