• Russ Cox's avatar
    io: guarantee err == nil for full reads in ReadFull and ReadAtLeast · 662ff542
    Russ Cox authored
    This is a backwards compatible API change that fixes broken code.
    
    In Go 1.0, ReadFull(r, buf) could return either len(buf), nil or len(buf), non-nil.
    Most code expects only the former, so do that and document the guarantee.
    
    Code that was correct before is still correct.
    Code that was incorrect before, by assuming the guarantee, is now correct too.
    
    The same applies to ReadAtLeast.
    
    Fixes #4544.
    
    R=golang-dev, bradfitz, minux.ma
    CC=golang-dev
    https://golang.org/cl/7235074
    662ff542
Name
Last commit
Last update
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
libmach Loading commit data...
pkg Loading commit data...
Make.dist Loading commit data...
all.bash Loading commit data...
all.bat Loading commit data...
all.rc Loading commit data...
clean.bash Loading commit data...
clean.bat Loading commit data...
clean.rc Loading commit data...
make.bash Loading commit data...
make.bat Loading commit data...
make.rc Loading commit data...
race.bash Loading commit data...
run.bash Loading commit data...
run.bat Loading commit data...
run.rc Loading commit data...
sudo.bash Loading commit data...