diff options
| author | demo <demo@antix1> | 2026-06-11 22:04:50 -0400 |
|---|---|---|
| committer | demo <demo@antix1> | 2026-06-11 22:04:50 -0400 |
| commit | 7645b465a687f582e363e6506a869c491cb431a6 (patch) | |
| tree | 3e54a38fa2c9b3a6b5076a0691a12650fa443ba9 | |
| parent | cb6060a60a834afb086c0a8978d70ab9a41c6a76 (diff) | |
feat: check that GOEXPERIMENT=goroutineleakprofile is set
| -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) |
