cihub / seelog

Seelog is a native Go logging library that provides flexible asynchronous dispatching, filtering, and formatting.
BSD 3-Clause "New" or "Revised" License
1.64k stars 244 forks source link

should close file first #154

Open nelsonzhu opened 7 years ago

nelsonzhu commented 7 years ago

iotest.go

func TempFile(t testing.T) (os.File, func()) { f, err := ioutil.TempFile("", "test") if err != nil { t.Fatal(err) } return f, func() { os.Remove(f.Name()) f.Close() } }

should be: f.Close() os.Remove(f.Name())