5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-12-23 00:35:39 +00:00

Remove unnecessary pprof log line

This commit is contained in:
Neil Alexander 2023-10-22 10:29:19 +01:00
parent 73c6c25bd9
commit 955aa4af79
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -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))
}