Blank import — handlers attach to http.DefaultServeMux
If you use a custom mux, you'll need to register the handlers yourself. Never expose pprof publicly — keep it on localhost or behind auth.
import (
"net/http"
_ "net/http/pprof"
)
func main() {
go http.ListenAndServe("localhost:6060", nil)
// ...
}