]> Cypherpunks repositories - gostls13.git/commitdiff
io: remove SizedReaderAt
authorRuss Cox <rsc@golang.org>
Tue, 24 May 2016 13:42:33 +0000 (09:42 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 24 May 2016 15:37:27 +0000 (15:37 +0000)
It's not clear we want to enshrine an io interface in which Size cannot
return an error. Because this requires more thought before committing
to the API, remove from Go 1.7.

Fixes #15818.

Change-Id: Ic4138ffb0e033030145a12d33f78078350a8381f
Reviewed-on: https://go-review.googlesource.com/23392
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>

api/next.txt
src/io/io.go

index ae60f2d73a41b135f923d38764cd7b6350778ea3..5ae56c126ada2033127dd3c65acbd2c0639c9842 100644 (file)
@@ -167,9 +167,6 @@ pkg io, const SeekEnd = 2
 pkg io, const SeekEnd ideal-int
 pkg io, const SeekStart = 0
 pkg io, const SeekStart ideal-int
-pkg io, type SizedReaderAt interface { ReadAt, Size }
-pkg io, type SizedReaderAt interface, ReadAt([]uint8, int64) (int, error)
-pkg io, type SizedReaderAt interface, Size() int64
 pkg math/big, method (*Float) GobDecode([]uint8) error
 pkg math/big, method (*Float) GobEncode() ([]uint8, error)
 pkg net, method (*Dialer) DialContext(context.Context, string, string) (Conn, error)
index 3d0a5a485e69b7c8a454e1e8fc12a44b007bd9f5..80398b39973918a43c8a4002a8b9b444fd13e786 100644 (file)
@@ -274,16 +274,6 @@ type RuneScanner interface {
        UnreadRune() error
 }
 
-// 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 SizedReaderAt interface {
-       ReaderAt
-       // Size reports the length of the data source in bytes.
-       Size() int64
-}
-
 // stringWriter is the interface that wraps the WriteString method.
 type stringWriter interface {
        WriteString(s string) (n int, err error)