]> Cypherpunks repositories - gostls13.git/commitdiff
io: clarify MultiReader documentation
authorAndrew Gerrand <adg@golang.org>
Tue, 28 Jan 2014 08:49:29 +0000 (19:49 +1100)
committerAndrew Gerrand <adg@golang.org>
Tue, 28 Jan 2014 08:49:29 +0000 (19:49 +1100)
Fixes #7216.

LGTM=minux.ma
R=golang-codereviews, minux.ma
CC=golang-codereviews
https://golang.org/cl/54740044

src/pkg/io/multi.go

index 2c7e816cff140266eef67c7c392be23f09f436c5..ab8dd5d3b40534e2354846b814d42d3a173ad004 100644 (file)
@@ -26,7 +26,8 @@ func (mr *multiReader) Read(p []byte) (n int, err error) {
 
 // MultiReader returns a Reader that's the logical concatenation of
 // the provided input readers.  They're read sequentially.  Once all
-// inputs are drained, Read will return EOF.
+// inputs have returned EOF, Read will return EOF.  If any of the readers
+// return a non-nil, non-EOF error, Read will return that error.
 func MultiReader(readers ...Reader) Reader {
        return &multiReader{readers}
 }