CSV Writer Buffer size

343 views
Skip to first unread message

Siddhant Sharma

unread,
Jun 11, 2019, 8:47:44 AM6/11/19
to golang-nuts
Currently, the csv writer does not contain any option to increase the buffer size to more than the default buffer size for bufio(4096). Does anybody know why?

Ian Lance Taylor

unread,
Jun 11, 2019, 9:30:20 AM6/11/19
to Siddhant Sharma, golang-nuts
On Tue, Jun 11, 2019 at 5:47 AM Siddhant Sharma
<sharmasi...@gmail.com> wrote:
>
> Currently, the csv writer does not contain any option to increase the buffer size to more than the default buffer size for bufio(4096). Does anybody know why?

If you want a different buffer size, just call bufio.NewWriterSize on
your io.Writer before passing it to csv.NewWriter. The right thing
will happen.

Ian
Reply all
Reply to author
Forward
0 new messages