summaryrefslogtreecommitdiff
path: root/src/pkg/io
diff options
context:
space:
mode:
authorAndrew Gerrand <adg@golang.org>2014-01-28 19:49:29 +1100
committerAndrew Gerrand <adg@golang.org>2014-01-28 19:49:29 +1100
commit6a811f726ae65b5c0f0d3bde50e0efd8bb05053a (patch)
tree81b20edee7c3f2c64e5cf987e02118bf0ae98187 /src/pkg/io
parentb826a2c07bb1834218ee57924e360e815d72b58a (diff)
downloadgo-6a811f726ae65b5c0f0d3bde50e0efd8bb05053a.tar.gz
io: clarify MultiReader documentation
Fixes issue 7216. LGTM=minux.ma R=golang-codereviews, minux.ma CC=golang-codereviews https://codereview.appspot.com/54740044
Diffstat (limited to 'src/pkg/io')
-rw-r--r--src/pkg/io/multi.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/io/multi.go b/src/pkg/io/multi.go
index 2c7e816cf..ab8dd5d3b 100644
--- a/src/pkg/io/multi.go
+++ b/src/pkg/io/multi.go
@@ -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}
}