From 7645b465a687f582e363e6506a869c491cb431a6 Mon Sep 17 00:00:00 2001 From: demo Date: Thu, 11 Jun 2026 22:04:50 -0400 Subject: feat: check that GOEXPERIMENT=goroutineleakprofile is set --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index db41eab..a4f6d46 100644 --- a/main.go +++ b/main.go @@ -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) -- cgit v1.2.3