Descriptionio: guarantee err == nil for full reads in ReadFull and ReadAtLeast
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 issue 4544.
Patch Set 1 #Patch Set 2 : diff -r 58e1987657d6 https://code.google.com/p/go/ #Patch Set 3 : diff -r 58e1987657d6 https://code.google.com/p/go/ #Patch Set 4 : diff -r bb293c428338 https://code.google.com/p/go/ #
MessagesTotal messages: 5
|