1
0
mirror of https://github.com/ehang-io/nps synced 2025-10-30 15:26:58 +08:00

Close file

This commit is contained in:
CallanTaylor
2019-11-19 13:57:25 +13:00
parent d5488f8aa3
commit 592c39fb1d

View File

@@ -119,6 +119,7 @@ func ReadAllFromFile(filePath string) ([]byte, error) {
if err != nil {
return nil, err
}
defer f.Close()
return ioutil.ReadAll(f)
}