]> Cypherpunks repositories - gostls13.git/commitdiff
io: change the name of ReadAtSizer to SizedReaderAt
authorRob Pike <r@golang.org>
Thu, 7 Apr 2016 03:19:47 +0000 (20:19 -0700)
committerRob Pike <r@golang.org>
Fri, 8 Apr 2016 14:46:19 +0000 (14:46 +0000)
This is a proposal. The old name is pretty poor. The new one describes
it better and may be easier to remember. It does not start with Read,
though I think that inconsistency is worthwhile.

Reworded the comment a bit for clarity.

Change-Id: Icb4f9c663cc68958e0363d7ff78a0b29cc521f98
Reviewed-on: https://go-review.googlesource.com/21629
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/io/io.go

index 23401dae931032a4b227fe4216179e84333b179d..023473c79bdb0a8d66b27b372b46c4b5e1d08831 100644 (file)
@@ -274,10 +274,11 @@ type RuneScanner interface {
        UnreadRune() error
 }
 
-// ReadAtSizer is the interface that groups the basic ReadAt and Size
-// methods, representing a sized data source that supports random
+// SizedReaderAt is the interface that groups the basic ReadAt method
+// with a Size method that reports the total size of the underlying
+// object. It represents a fixed-size data source that supports random
 // access by multiple concurrent goroutines.
-type ReadAtSizer interface {
+type SizedReaderAt interface {
        ReaderAt
        // Size reports the length of the data source in bytes.
        Size() int64