From c78f6aa535ec52788371948f19851971acd29ef4 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Sat, 28 Sep 2019 01:07:33 -0400 Subject: [PATCH] made sure each file closed after stating them --- string.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/string.go b/string.go index ff3c6c4..3007569 100644 --- a/string.go +++ b/string.go @@ -14,6 +14,8 @@ func timeToString(currentTime time.Time) string { func osfileToSting(currentOsFile *os.File) string { file, err := os.Open(currentOsFile.Name()) + defer file.Close() + fileinfo, err := file.Stat() if err != nil {