mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-01 19:06:52 +00:00
Close file
This commit is contained in:
@@ -119,6 +119,7 @@ func ReadAllFromFile(filePath string) ([]byte, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer f.Close()
|
||||
return ioutil.ReadAll(f)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user