On Mon, 2021-06-21 at 17:57 -0500, Steven Penny wrote:
> > No, I gave a clear path that would lead to a case of a non-detected
> > error when Close is not called.
> >
> > This seems like a really odd hill to die on, but it's your choice I
> > guess.
>
> You calling "go look through 3200 lines of Go code" (not including
> tests) [1] a
> "clear path" is a dubious comment at best.
>
> 1. https://github.com/golang/go/tree/master/src/compress/flate

You asked a question. People here are genuinely trying to help you by
giving you their acquired knowledge of (collectively) over more than a
couple of decades of Go programming.

I spent 5 minutes looking at flate to find a path where an error can be
generated and not returned until Close is called; the part of the code
in particular that you want to look at is calls to compressor.step
which is assigned a method value (it should be straightforward to see
where this is assigned and what the assigned methods do).

However, the short answer is that the authors of the types included the
Close method for a reason; here your finding that bzip2.Reader doesn't
have a Close is a petard for you since it's clear that they're not just
added for the hell of it.

Dan


-- 
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 golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/ccf4f6f030566878a1e66a825d4bb11f88609f3a.camel%40kortschak.io.

Reply via email to