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
io.Writer says that Writemust return a non-nil error if it returns n < len(p) but clnt.(*File).Write can return n < len(buf) and nil as an error.
The effect is that using a clnt.File with something that takes an io.Writer, like io.Copy, will compile and appear to work correctly until a large write (>4kb?) is attempted, and then break.
The text was updated successfully, but these errors were encountered:
IMHO Write should either be made conform with io.Writer, removed entirely, or the documentation should have a big warning about using Files as io.Writers.
io.Writer
says thatWrite
must return a non-nil error if it returns n < len(p) butclnt.(*File).Write
can returnn < len(buf)
and nil as an error.The effect is that using a
clnt.File
with something that takes anio.Writer
, likeio.Copy
, will compile and appear to work correctly until a large write (>4kb?) is attempted, and then break.The text was updated successfully, but these errors were encountered: