add missing File.Close() calls

This commit is contained in:
Jeremy Baxter 2026-01-05 01:28:24 +13:00
parent 06f296639e
commit 58b6b1618d
2 changed files with 3 additions and 0 deletions

View file

@ -26,6 +26,7 @@ func Dirents(dir string) (entries []string, err error) {
if err != nil {
return nil, errors.New(err.Error())
}
defer d.Close()
names, err := d.Readdirnames(0)
if err != nil {