• Brad Fitzpatrick's avatar
    io: add ReadAtSizer interface · 7f39f21c
    Brad Fitzpatrick authored
    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/21492Reviewed-by: 's avatarRob Pike <r@golang.org>
    7f39f21c
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...