fix: close file in the GrepFile func
This commit is contained in:
parent
d703f533d0
commit
5a366cd62b
@ -69,6 +69,7 @@ func GrepFile(patten string, filename string) (lines []string, err error) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer fd.Close()
|
||||
lines = make([]string, 0)
|
||||
reader := bufio.NewReader(fd)
|
||||
prefix := ""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user