From 955aa4af79886f05c3d45ea08c8b36de721fd79e Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sun, 22 Oct 2023 10:29:19 +0100 Subject: [PATCH] Remove unnecessary pprof log line --- src/core/debug.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/core/debug.go b/src/core/debug.go index 23139f9a..a6eb5e2a 100644 --- a/src/core/debug.go +++ b/src/core/debug.go @@ -10,11 +10,7 @@ import ( // Start the profiler if the required environment variable is set. func init() { envVarName := "PPROFLISTEN" - hostPort := os.Getenv(envVarName) - switch { - case hostPort == "": - fmt.Fprintf(os.Stderr, "DEBUG: %s not set, profiler not started.\n", envVarName) - default: + if hostPort := os.Getenv(envVarName); hostPort != "" { fmt.Fprintf(os.Stderr, "DEBUG: Starting pprof on %s\n", hostPort) go fmt.Println(http.ListenAndServe(hostPort, nil)) }