Skip to content

Commit

Permalink
Oops. Forgot close file handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshinx committed Jun 12, 2015
1 parent 1b660a3 commit 5c651ba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 5c651ba

Please sign in to comment.