mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-25 17:53:24 +01:00
fix: close file (#213)
This commit is contained in:
parent
998d507594
commit
35d873f618
@ -172,6 +172,7 @@ func countLinesInFile(filename string) (int, error) {
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
defer file.Close()
|
||||
buf := make([]byte, 32*1024)
|
||||
count := 0
|
||||
lineSep := []byte{'\n'}
|
||||
|
Loading…
Reference in New Issue
Block a user