From b2c4837b058adf56aae3fb1ef8cadddef7fb2c7b Mon Sep 17 00:00:00 2001 From: Onur Cinar Date: Mon, 18 Dec 2023 19:24:46 -0800 Subject: [PATCH] Close result. --- helper/report.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/helper/report.go b/helper/report.go index db1ed7f..aeee458 100644 --- a/helper/report.go +++ b/helper/report.go @@ -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() }