Add missing error checks and simplify bool check

Signed-off-by: Mrunal Patel <mpatel@redhat.com>
This commit is contained in:
Mrunal Patel 2017-06-16 15:49:16 -07:00
parent 784d03809e
commit bd40bbc30b
2 changed files with 8 additions and 4 deletions

View file

@ -290,7 +290,7 @@ func main() {
if err != nil {
return fmt.Errorf("invalid --cpu-profile value %q", err)
}
pprof.StartCPUProfile(f)
_ = pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()
}