Skip to content

Commit

Permalink
Close result.
Browse files Browse the repository at this point in the history
  • Loading branch information
cinar committed Dec 19, 2023
1 parent d45bd65 commit b2c4837
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions helper/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,10 @@ func (r *Report) WriteToFile(fileName string) error {
return err
}

defer file.Close()

err = r.WriteToWriter(file)
if err != nil {
return err
}

return file.Sync()
return file.Close()
}

0 comments on commit b2c4837

Please sign in to comment.