You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docs for gob.Decoder.Decode() should mention that io.EOF is returned when there's
nothing more to decode. One of the examples could be extended to show how to handle that
properly. Due to lack of this information, I had to write a test program to understand
the behavior.
The text was updated successfully, but these errors were encountered:
I don't find it surprising. If you feel like being condescending, then at least be
factually correct wrt what I wrote.
The behavior is perfectly logical once you know it but when I didn't know it, it wasn't
obvious. Obviously.
I don't have an explanation for my confusion. I know that I did experience it.
Maybe I'm dumb.
Or maybe you can't expect people to make mental connections between an EOF constant in
io package and error returned from Decode(). Documentation is not meant to be a puzzle.
FWIW, I agree that it's nice to be explicit about what can be expected. It's not that
"EOF at end of input" is surprising, it's that unless that fact is documented, you might
not want to rely on it.
by kkowalczyk:
The text was updated successfully, but these errors were encountered: