Close unclosed file

This commit is contained in:
CallanTaylor 2019-11-04 14:43:34 +13:00
parent adc3adc13b
commit 1865bb07a1

View File

@ -65,6 +65,7 @@ func ReadFile(file string) (content string, err error) {
if err != nil {
return content, err
}
defer file.Close()
buf, err := ioutil.ReadAll(file)
if err != nil {
return content, err