Should you check the error returned from calling
http.ResponseWriter.Write()? I ask because in all the examples I've seen
this error is not checked. If it is okay to ignore that error then why?
What kind of errors would be returned from Write()?
Thanks,
Lucas
--
You received this message beca
Could you give an example situation where you *would* be able to do
something about that error? And again, when might Write() return an error
at all?
Even if I couldn't do anything to fix the situation for the client
receiving that Write() I could log the error just so I know it happened and
b
So do you think this error should be checked and if yes, under what
circumstances?
On Sunday, October 22, 2017 at 2:05:37 AM UTC-5, Jakob Borg wrote:
>
> On 21 Oct 2017, at 21:20, "groene...@gmail.com " <
> groene...@gmail.com > wrote:
>
> And again, when might Write() return an error at all?
>
>
I don't have a specific situation in mind where I could correct an error
returned from Write() but it feels nice to log the error if one occurs just
for the sake of knowing. Is that silly? I'm picturing that it could be
helpful if there is a spike in network trouble because then you would be
ab
Thank you all for all your help!
My takeaway from this is that, generally, it is not beneficial to check the
error from ResponseWriter.Write() since usually no action can be taken.
On Monday, October 23, 2017 at 12:56:04 AM UTC-5, Tamás Gulácsi wrote:
>
> In thw concrete case, ResponseWriter.Wri
I had a question and when I looked through the FAQ I saw it:
https://golang.org/doc/faq#covariant_types. But could anyone give more
information specifically as to why Go does not have "covariant types"? What
is
the motivation behind that choice? If Go did support it, what kind of
problems
could c
That works for me! Thanks for your answer. Difficult for humans to reason
about + difficult to implement seems like a decent reason to leave it out
:).
In general, do you think covariant types are more trouble than they're
worth?
I don't think I've ever encountered them before (or if I did, I did
Hello,
First off, it's worth noting that I have come up with a solution to my
problem. I'm mostly wondering if there is a better way as it feels a bit
hacky. Thanks in advance for any help.
I want to get a percent of how many lines of code in an entire repository
are covered by unit tests. The