mirror of
https://github.com/golang/go.git
synced 2025-11-12 06:31:05 +00:00
introduce os.EOF and io.ErrUnexpectedEOF.
remove io.ErrEOF. rename io.FullRead to io.ReadFull, to match ReadAtLeast and ReadAll. remove io.FullReader, because it is now unused. R=r DELTA=295 (88 added, 105 deleted, 102 changed) OCL=30544 CL=30588
This commit is contained in:
parent
022ee0c26f
commit
64684cc2a2
23 changed files with 147 additions and 164 deletions
|
|
@ -46,7 +46,7 @@ func readBytes(buf *Reader) string {
|
|||
nb := 0;
|
||||
for {
|
||||
c, e := buf.ReadByte();
|
||||
if e == io.ErrEOF {
|
||||
if e == os.EOF {
|
||||
break
|
||||
}
|
||||
if e != nil {
|
||||
|
|
@ -88,7 +88,7 @@ func readLines(b *Reader) string {
|
|||
s := "";
|
||||
for {
|
||||
s1, e := b.ReadLineString('\n', true);
|
||||
if e == io.ErrEOF {
|
||||
if e == os.EOF {
|
||||
break
|
||||
}
|
||||
if e != nil {
|
||||
|
|
@ -106,7 +106,7 @@ func reads(buf *Reader, m int) string {
|
|||
for {
|
||||
n, e := buf.Read(b[nb:nb+m]);
|
||||
nb += n;
|
||||
if e == io.ErrEOF {
|
||||
if e == os.EOF {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue