обновил либы

This commit is contained in:
Alexander NeonXP Kiryukhin 2024-04-06 20:44:41 +03:00
parent 7908b1e119
commit d97aec1586
Signed by: NeonXP
GPG key ID: 35E33E1AB7776B39
3 changed files with 8 additions and 4 deletions

2
go.mod
View file

@ -2,6 +2,6 @@ module go.neonxp.dev/pkg
go 1.22.1 go 1.22.1
require gitrepo.ru/neonxp/middleware v0.0.0-20240406170514-e2509238d2b7 require gitrepo.ru/neonxp/middleware v0.0.0-20240406173909-2e050160b553
require github.com/google/uuid v1.6.0 // indirect require github.com/google/uuid v1.6.0 // indirect

2
go.sum
View file

@ -2,3 +2,5 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
gitrepo.ru/neonxp/middleware v0.0.0-20240406170514-e2509238d2b7 h1:fcaAepmyVZMDA2UllERGKEXO5u9rvyWIbk83EvV4zoU= gitrepo.ru/neonxp/middleware v0.0.0-20240406170514-e2509238d2b7 h1:fcaAepmyVZMDA2UllERGKEXO5u9rvyWIbk83EvV4zoU=
gitrepo.ru/neonxp/middleware v0.0.0-20240406170514-e2509238d2b7/go.mod h1:5K+tNLUK80Oo/Yy5wyILIk9KjjX0X/mhzkh67aEnUmk= gitrepo.ru/neonxp/middleware v0.0.0-20240406170514-e2509238d2b7/go.mod h1:5K+tNLUK80Oo/Yy5wyILIk9KjjX0X/mhzkh67aEnUmk=
gitrepo.ru/neonxp/middleware v0.0.0-20240406173909-2e050160b553 h1:U1KYhZrqBM+uvzsa4bQYZbEHxbO/5YfZqK2fBVvFfW4=
gitrepo.ru/neonxp/middleware v0.0.0-20240406173909-2e050160b553/go.mod h1:5K+tNLUK80Oo/Yy5wyILIk9KjjX0X/mhzkh67aEnUmk=

View file

@ -65,9 +65,11 @@ func main() {
mux.Handle("GET /static/", http.FileServerFS(staticFS)) mux.Handle("GET /static/", http.FileServerFS(staticFS))
logger := slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{})) logger := slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{}))
h := middleware.Logger(mux, logger) h := middleware.Use(mux,
h = middleware.Recover(h, logger) middleware.Logger(logger),
h = middleware.RequestID(h) middleware.Recover(logger),
middleware.RequestID,
)
srv := &http.Server{ srv := &http.Server{
Handler: h, Handler: h,