WriteAll writes multiple CSV records to w using Write and then calls Flush.
(records [][]string)
| 121 | |
| 122 | // WriteAll writes multiple CSV records to w using Write and then calls Flush. |
| 123 | func (w *Writer) WriteAll(records [][]string) error { |
| 124 | for _, record := range records { |
| 125 | err := w.Write(record) |
| 126 | if err != nil { |
| 127 | return err |
| 128 | } |
| 129 | } |
| 130 | return w.w.Flush() |
| 131 | } |
| 132 | |
| 133 | // fieldNeedsQuotes reports whether our field must be enclosed in quotes. |
| 134 | // Fields with a Comma, fields with a quote or newline, and |