From 1c03bd7f7b5a37069ce8fa7254d10b9bd46d5abf Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 18 Sep 2014 22:22:44 +0200 Subject: [PATCH] Clarify behaviour of Next() --- chunker/chunker.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chunker/chunker.go b/chunker/chunker.go index d2e35a107..b3950bf13 100644 --- a/chunker/chunker.go +++ b/chunker/chunker.go @@ -44,9 +44,9 @@ type Chunk struct { // A chunker takes a stream of bytes and emits average size chunks. type Chunker interface { // Next returns the next chunk of data. If an error occurs while reading, - // the error is returned. The state of the current chunk is undefined. When - // the last chunk has been returned, all subsequent calls yield a nil chunk - // and an io.EOF error. + // the error is returned with a nil chunk. The state of the current chunk + // is undefined. When the last chunk has been returned, all subsequent + // calls yield a nil chunk and an io.EOF error. Next() (*Chunk, error) }