Details
-
Test
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
0.17.1
Description
The writer in the test case 'TestReadWrite' is double closed.
w, err := NewWriter(f, recs[0].Schema()) if err != nil { t.Fatal(err) } defer w.Close() // <= Here for i, rec := range recs { err = w.Write(rec) if err != nil { t.Fatalf("could not write record[%d] to JSON: %v", i, err) } } err = w.Close() // <= Here if err != nil { t.Fatalf("could not close JSON writer: %v", err) }
The 'defer w.Close()' is redundant, which makes one more ']}' in the end of the output json file .
Attachments
Issue Links
- links to