mirror of
https://github.com/fatedier/frp.git
synced 2024-11-24 02:59:19 +08:00
Close file
This commit is contained in:
parent
12cc53d699
commit
8affab1a2b
@ -55,6 +55,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
|
||||
@ -65,6 +66,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
|
||||
|
Loading…
Reference in New Issue
Block a user