From 476a2f9b45816ab3183d7d69d695ac44ef753298 Mon Sep 17 00:00:00 2001 From: Umputun Date: Fri, 24 Mar 2023 03:54:02 -0500 Subject: [PATCH] lint: unused param --- profiler.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/profiler.go b/profiler.go index 13fecbd..88d8f12 100644 --- a/profiler.go +++ b/profiler.go @@ -9,13 +9,13 @@ import ( // Profiler is a convenient subrouter used for mounting net/http/pprof. ie. // -// func MyService() http.Handler { -// r := chi.NewRouter() -// // ..middlewares -// r.Mount("/debug", middleware.Profiler()) -// // ..routes -// return r -// } +// func MyService() http.Handler { +// r := chi.NewRouter() +// // ..middlewares +// r.Mount("/debug", middleware.Profiler()) +// // ..routes +// return r +// } func Profiler(onlyIps ...string) http.Handler { mux := http.NewServeMux() mux.HandleFunc("/pprof/", pprof.Index) @@ -33,7 +33,7 @@ func Profiler(onlyIps ...string) http.Handler { } // expVars copied from stdlib expvar.go as is not public. -func expVars(w http.ResponseWriter, r *http.Request) { +func expVars(w http.ResponseWriter, _ *http.Request) { first := true w.Header().Set("Content-Type", "application/json") fmt.Fprintf(w, "{\n")