close file after write

This commit is contained in:
Kirill Zhuravlev 2023-02-15 00:36:18 +01:00 committed by Avelino
parent 897a6bc267
commit 494289eb6f
No known key found for this signature in database
GPG Key ID: B345B4D52E98180A
1 changed files with 4 additions and 0 deletions

View File

@ -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
}