diff --git a/pkg/server/profile.go b/pkg/server/profile.go index eb5787e..dcb9d6f 100644 --- a/pkg/server/profile.go +++ b/pkg/server/profile.go @@ -4,14 +4,9 @@ package server import ( - "net/http/pprof" + "github.com/go-chi/chi/v5/middleware" ) func (s *Server) installPprof() { - r := s.r - r.HandleFunc("/debug/pprof/", pprof.Index) - r.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline) - r.HandleFunc("/debug/pprof/profile", pprof.Profile) - r.HandleFunc("/debug/pprof/symbol", pprof.Symbol) - r.HandleFunc("/debug/pprof/trace", pprof.Trace) + s.r.Mount("/debug", middleware.Profiler()) }