separate pprof from debug mode

enabled with -pprof now.
This commit is contained in:
Harvey Tindall
2021-03-23 21:59:04 +00:00
parent 636bc22d52
commit f0dccc58aa
2 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ func (app *appContext) loadRouter(address string, debug bool) *gin.Engine {
app.loadHTML(router)
router.Use(static.Serve("/", app.webFS))
router.NoRoute(app.NoRouteHandler)
if debug {
if *PPROF {
app.debug.Println("Loading pprof")
pprof.Register(router)
}