transform.Writer -> bufio.Writer -> os.File
When I want to close the Writers, I must:
- close the transform.Writer
- flush the bufio.Writer
- close the os.File
I just wondered why Flush and Close don't "cascade" down the chain.
That is, calling Close on transform.Writer should call Flush on
bufio.Writer, which would call Close on os.File.
It seems to me that the abstraction of io.WriteCloser is leaky, as the
underlying Writer must be flushed and closed explicitely.
Have I missed some explanation ?
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
For more options, visit https://groups.google.com/d/optout.