Silence error about previous defer not running after "log.Fatal".

This commit is contained in:
Joachim Bauch 2025-12-04 11:13:12 +01:00
commit 6d3ff0c5ba
No known key found for this signature in database
GPG key ID: 77C1D22D53E15F02

View file

@ -531,7 +531,7 @@ func main() {
if *memprofile != "" {
f, err := os.Create(*memprofile)
if err != nil {
log.Fatal(err)
log.Fatal(err) // nolint (defer pprof.StopCPUProfile() will not run which is ok in case of errors)
}
defer func() {