#io.ReadAll and errors

14 messages · Page 1 of 1 (latest)

dapper mantle
#

Hey, all. Can someone explain the last sentence in the io.ReadFull docstr

If r returns an error having read at least len(buf) bytes, the error is dropped.
In particular, why would io.ReadFull ever read more than len(buf) bytes?

leaden shadow
dapper mantle
leaden shadow
dapper mantle
#

I can't type. Yes, io.ReadFull.

leaden shadow
#

ReadAll grows an internal buffer forever until io.EOF is returned, it doesn't care about considerations like that

leaden shadow
fallow cobalt
dapper mantle
fallow cobalt
#

yes it is!

dapper mantle
#

oh, then you lost 😮

leaden shadow
fallow cobalt
#

idk but I'm evidently losing