forked from mirrors/homebox
* fix inaccruate 401 error on SQL db error * init golangci-lint config * linter autofix * testify auto fixes * fix sqlite busy errors * fix naming * more linter errors * fix rest of linter issues Former-commit-id: e8449b3a7363a6cfd5bc6151609e6d2d94b4f7d8
17 lines
470 B
Go
17 lines
470 B
Go
// Package debughandlers provides handlers for debugging.
|
|
package debughandlers
|
|
|
|
import (
|
|
"expvar"
|
|
"net/http"
|
|
"net/http/pprof"
|
|
)
|
|
|
|
func New(mux *http.ServeMux) {
|
|
mux.HandleFunc("/debug/pprof", pprof.Index)
|
|
mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
|
|
mux.HandleFunc("/debug/pprof/profile", pprof.Profile)
|
|
mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
|
|
mux.HandleFunc("/debug/pprof/trace", pprof.Trace)
|
|
mux.Handle("/debug/vars", expvar.Handler())
|
|
}
|