Oops. Forgot close file handler.

This commit is contained in:
kenshinx 2015-06-12 12:04:23 +08:00
parent 1b660a33ff
commit 5c651bacf3

View File

@ -109,6 +109,7 @@ func (f *FileHosts) Refresh() {
if err != nil {
panic("Can't open " + f.file)
}
defer buf.Close()
scanner := bufio.NewScanner(buf)
for scanner.Scan() {