Skip to content

Commit

Permalink
lint: unused param
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Mar 24, 2023
1 parent 09c4505 commit 476a2f9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions profiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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")
Expand Down

0 comments on commit 476a2f9

Please sign in to comment.