examples/blocks: bug fix: do not ignore error

This commit is contained in:
Hajime Hoshi 2024-07-29 17:37:30 +09:00
parent 0281ac7bd2
commit c8aea2df16

View File

@ -38,7 +38,11 @@ func main() {
if err := pprof.StartCPUProfile(w); err != nil {
log.Fatal(err)
}
defer w.Flush()
defer func() {
if err := w.Flush(); err != nil {
log.Fatal(err)
}
}()
defer pprof.StopCPUProfile()
}