From 97a0ac4ddc3f3071c9ade572666ca8fee2dd171e Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Sat, 30 Mar 2019 12:52:55 -0500 Subject: [PATCH] Clarify ChunkReader.Next contract --- chunkreader.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chunkreader.go b/chunkreader.go index 230335c4..0acfd4bf 100644 --- a/chunkreader.go +++ b/chunkreader.go @@ -8,8 +8,8 @@ import ( // ChunkReader is an interface to decouple github.com/jackc/chunkreader from this package. type ChunkReader interface { - // Next returns buf filled with the next n bytes. If an error occurs, buf will be nil. Next must - // not reuse buf. In case of error, Next must preserve partially read data. + // Next returns buf filled with the next n bytes. If an error (including a partial read) occurs, + // buf must be nil. Next must preserve any partially read data. Next must not reuse buf. Next(n int) (buf []byte, err error) }