Commit f8a86e4c authored by guangxuli's avatar guangxuli

the created path should be closed in test case

parent 8d008254
......@@ -93,6 +93,7 @@ func write(path, contents string, t *testing.T) {
if err != nil {
t.Fatalf("Failed to create %v.", path)
}
defer f.Close()
_, err = f.WriteString(contents)
if err != nil {
t.Fatalf("Failed to write to %v.", path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment