обновил либы
This commit is contained in:
parent
7908b1e119
commit
d97aec1586
3 changed files with 8 additions and 4 deletions
2
go.mod
2
go.mod
|
@ -2,6 +2,6 @@ module go.neonxp.dev/pkg
|
|||
|
||||
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
|
||||
|
|
2
go.sum
2
go.sum
|
@ -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=
|
||||
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-20240406173909-2e050160b553 h1:U1KYhZrqBM+uvzsa4bQYZbEHxbO/5YfZqK2fBVvFfW4=
|
||||
gitrepo.ru/neonxp/middleware v0.0.0-20240406173909-2e050160b553/go.mod h1:5K+tNLUK80Oo/Yy5wyILIk9KjjX0X/mhzkh67aEnUmk=
|
||||
|
|
8
main.go
8
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,
|
||||
|
|
Loading…
Reference in a new issue