io.Writer says that Write must 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.
io.Writersays thatWritemust return a non-nil error if it returns n < len(p) butclnt.(*File).Writecan returnn < len(buf)and nil as an error.The effect is that using a
clnt.Filewith something that takes anio.Writer, likeio.Copy, will compile and appear to work correctly until a large write (>4kb?) is attempted, and then break.