Re: [go-nuts] bufio.Writer's sticky errors & lost data

2018-09-20 Thread Dan Kortschak
I think here, writing your own buffer type would be the most sensible approach. On Wed, 2018-09-19 at 10:14 -0700, John Floren wrote: > What's the right way to handle this? Write our own bufio that lets us > reset  > the error and io.Writer while preserving unwritten data? -- You received this m

Re: [go-nuts] bufio.Writer's sticky errors & lost data

2018-09-20 Thread Peter Waller
On Thu, 20 Sep 2018 at 03:39, John Floren wrote: > What's the right way to handle this? Write our own bufio that lets us > reset the error and io.Writer while preserving unwritten data? > I'm not sure there is "one right way", but one possibility is to push the reliability layer one level down: