Thanks for the response. Couple of points:

> 1. You don't get notified about checksum mismatches or the like. i.e. the
> data you read might be corrupted and you might not realize it.

I dont think this is true. I tried with this file [1], and Close returns the
same error as, for example io.Copy, so again Close seems redundant.

> Either way, it's also just good hygiene to *always* call `Close` on an
> `io.Closer`. If a library gives you a `Close` method, it usually expects you
> to call it and there's really no point in not doing it.

Even with something like net/http#Head? Seems pointless in that case too.

1. https://storage.googleapis.com/go-attachment/6550/0/will_hang.gz

-- 
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/CAP8dQms22dyE_FN1kM401t37CVKxEfbWtogaFio7X-YDZfAChA%40mail.gmail.com.

Reply via email to