From 592c39fb1dce5f036f344c70f30657f0cc3b3eff Mon Sep 17 00:00:00 2001 From: CallanTaylor Date: Tue, 19 Nov 2019 13:57:25 +1300 Subject: [PATCH] Close file --- lib/common/util.go | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/common/util.go b/lib/common/util.go index 41f8b3c..3c4a57b 100755 --- a/lib/common/util.go +++ b/lib/common/util.go @@ -119,6 +119,7 @@ func ReadAllFromFile(filePath string) ([]byte, error) { if err != nil { return nil, err } + defer f.Close() return ioutil.ReadAll(f) }