INNER CODE UNIT · Go
len
256dpi/lungo · bucket.go:1207
for read < len(buf) {
// check if buffer is empty
if len(s.buffer) == 0 {
// get next chunk
err = s.next()
if err == io.EOF {
// only return EOF if no data has been read
if read == 0 {
return 0, io.EOF
}
return read, nil
} else if err != nil {
return read, err
}
}
// copy data