Check error

This commit is contained in:
Alexander Neumann
2021-08-11 14:32:10 +02:00
parent 39839cfac4
commit 4db46a5d3d

View File

@@ -97,8 +97,11 @@ func runRoot(cmd *cobra.Command, args []string) error {
go func() {
for range sigintCh {
pprof.StopCPUProfile()
f.Close()
log.Println("Stopped CPU profiling")
err := f.Close()
if err != nil {
log.Printf("error closing CPU profile file: %v", err)
}
os.Exit(130)
}
}()