From 494289eb6f3538e27f4e5927cff2661997dd55e2 Mon Sep 17 00:00:00 2001 From: Kirill Zhuravlev Date: Wed, 15 Feb 2023 00:36:18 +0100 Subject: [PATCH] close file after write --- scripts.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts.go b/scripts.go index 9791d467..dd1e41c7 100644 --- a/scripts.go +++ b/scripts.go @@ -33,5 +33,9 @@ func renderIndex(srcFilename, outFilename string) error { return err } + if err := f.Close(); err != nil { + return fmt.Errorf("unable to close index file: %w", err) + } + return nil }