mirror of
https://github.com/golang/go
synced 2024-11-21 16:14:42 -07:00
cmd/covdata: close output meta-data file
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
This commit is contained in:
parent
d49a14c609
commit
747308fd01
@ -237,6 +237,11 @@ func (mm *metaMerge) emitMeta(outdir string, pcombine bool) [16]byte {
|
||||
if err != nil {
|
||||
fatal("unable to open output meta-data file %s: %v", fpath, err)
|
||||
}
|
||||
defer func() {
|
||||
if err := mf.Close(); err != nil {
|
||||
fatal("error closing output meta-data file %s: %v", fpath, err)
|
||||
}
|
||||
}()
|
||||
|
||||
// Encode and write.
|
||||
mfw := encodemeta.NewCoverageMetaFileWriter(fpath, mf)
|
||||
|
Loading…
Reference in New Issue
Block a user