mirror of
https://github.com/ehang-io/nps.git
synced 2025-07-03 04:53:50 +00:00
Close file
This commit is contained in:
parent
d5488f8aa3
commit
592c39fb1d
@ -119,6 +119,7 @@ func ReadAllFromFile(filePath string) ([]byte, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
defer f.Close()
|
||||||
return ioutil.ReadAll(f)
|
return ioutil.ReadAll(f)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user