Hi, nice job.
I think that it wouuld be nice if the clnt api would implement the io.Reader
interface for File.
In particular I want to be able to use: ioutil.ReadAll(file)
The first thing I noticed is:
noce.go:36: cannot use file (type *clnt.File) as type io.Reader in function
argument:
*clnt.File does not implement io.Reader (wrong type for Read method)
have Read(buf []uint8) (int, *p.Error)
want Read(p []uint8) (n int, err os.Error)
I tried to fix the signatures:
-func (clnt *Clnt) Read(fid *Fid, offset uint64, count uint32) ([]byte,
*p.Error) {
+func (clnt *Clnt) Read(fid *Fid, offset uint64, count uint32) ([]byte,
os.Error) {
....
and it built fine. However at runtime the ioutil.ReadAll(file) didn't return.
I suspect that the is some difference w.r.t the io.Reader interface in way EOF
is signaled.
Original issue reported on code.google.com by mmikuli...@gmail.com on 31 May 2011 at 9:30
Original issue reported on code.google.com by
mmikuli...@gmail.com
on 31 May 2011 at 9:30