aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/io
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-10-03 05:27:36 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-10-03 05:27:36 +0000
commitbd2e46c8255fad4e75e589b3286ead560e910b39 (patch)
tree4f194bdb2e9edcc69ef2ab0dfb4aab15ca259267 /libgo/go/io
parentbed6238ce677ba18a672a58bc077cec6de47f8d3 (diff)
downloadgcc-bd2e46c8255fad4e75e589b3286ead560e910b39.zip
gcc-bd2e46c8255fad4e75e589b3286ead560e910b39.tar.gz
gcc-bd2e46c8255fad4e75e589b3286ead560e910b39.tar.bz2
libgo: Update to Go 1.0.3.
From-SVN: r192025
Diffstat (limited to 'libgo/go/io')
-rw-r--r--libgo/go/io/io.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/libgo/go/io/io.go b/libgo/go/io/io.go
index 54bf159..5187eff 100644
--- a/libgo/go/io/io.go
+++ b/libgo/go/io/io.go
@@ -130,11 +130,23 @@ type ReadWriteSeeker interface {
}
// ReaderFrom is the interface that wraps the ReadFrom method.
+//
+// ReadFrom reads data from r until EOF or error.
+// The return value n is the number of bytes read.
+// Any error except io.EOF encountered during the read is also returned.
+//
+// The Copy function uses ReaderFrom if available.
type ReaderFrom interface {
ReadFrom(r Reader) (n int64, err error)
}
// WriterTo is the interface that wraps the WriteTo method.
+//
+// WriteTo writes data to w until there's no more data to write or
+// when an error occurs. The return value n is the number of bytes
+// written. Any error encountered during the write is also returned.
+//
+// The Copy function uses WriterTo if available.
type WriterTo interface {
WriteTo(w Writer) (n int64, err error)
}