diff options
| -rw-r--r-- | main.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -7,6 +7,7 @@ import ( "fmt" "log" "net/url" + "os" "runtime/pprof" "strings" "time" @@ -15,6 +16,10 @@ import ( ) func main() { + if os.Getenv("GOEXPERIMENT") != "goroutineleakprofile" { + log.Fatal("Missing GOEXPERIMENT=goroutineleakprofile environment setting") + } + // Setting shorfile helps especially for when we log errors // without returning them. log.SetFlags(log.LstdFlags | log.Lshortfile) |
