pprof_off.go (397B)
1 //go:build !debug && !debugenv 2 // +build !debug,!debugenv 3 4 package debug 5 6 import "net/http" 7 8 // ServePprof will start an HTTP server serving /debug/pprof only if debug enabled. 9 func ServePprof(addr string) error { 10 return nil 11 } 12 13 // WithPprof will add /debug/pprof handling (provided by "net/http/pprof") only if debug enabled. 14 func WithPprof(handler http.Handler) http.Handler { 15 return handler 16 }