diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2016-04-04 16:54:54 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-04-06 04:02:49 +0000 |
| commit | 7f39f21c7be83b9ff59089b29fa9e723c13cafa9 (patch) | |
| tree | 3441bf94bc50a0cff8a3ea7caddb3f41d4647325 /src/runtime | |
| parent | 34c58065e54e0ac2d610b4a550bdba8f1db90ec6 (diff) | |
| download | go-7f39f21c7be83b9ff59089b29fa9e723c13cafa9.tar.xz | |
io: add ReadAtSizer interface
ReadAtSizer is a common abstraction for a stateless,
concurrently-readable fixed number of bytes.
This interface has existed in various codebases for over 3 years (previously
usually named SizeReaderAt). It is used inside Google in dl.google.com
(mentioned in https://talks.golang.org/2013/oscon-dl.slide) and other
packages. It is used in Camlistore, in Juju, in the Google API Go client, in
github.com/nightlyone/views, and 33 other pages of Github search results.
It is implemented by io.SectionReader, bytes.Reader, strings.Reader, etc.
Time to finally promote this interface to the standard library and give it a
standard name, blessing it as best practice.
Updates #7263
Updates #14889
Change-Id: Id28c0cafa7d2d37e8887c54708b5daf1b11c83ea
Reviewed-on: https://go-review.googlesource.com/21492
Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/runtime')
0 files changed, 0 insertions, 0 deletions
