mirror of
https://github.com/golang/go
synced 2024-11-18 10:54:40 -07:00
cmd/cover: check os.Create error im html output
The error was being written over by Execute. Change-Id: Id5965542bf4d414043fdbe70ee3f2f790728c01d Reviewed-on: https://go-review.googlesource.com/34954 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
8b89e95de3
commit
354f9f8b43
@ -67,6 +67,9 @@ func htmlOutput(profile, outfile string) error {
|
||||
} else {
|
||||
out, err = os.Create(outfile)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = htmlTemplate.Execute(out, d)
|
||||
if err == nil {
|
||||
err = out.Close()
|
||||
|
Loading…
Reference in New Issue
Block a user