mirror of
https://github.com/golang/go.git
synced 2025-11-09 05:01:01 +00:00
document bufio
R=rsc DELTA=61 (27 added, 2 deleted, 32 changed) OCL=25877 CL=25889
This commit is contained in:
parent
333cdd8f2a
commit
5dd4ef5716
3 changed files with 59 additions and 34 deletions
|
|
@ -108,7 +108,7 @@ func readLines(b *BufRead) string {
|
|||
s := "";
|
||||
for {
|
||||
s1, e := b.ReadLineString('\n', true);
|
||||
if e == EndOfFile {
|
||||
if e == io.ErrEOF {
|
||||
break
|
||||
}
|
||||
if e != nil {
|
||||
|
|
@ -125,7 +125,7 @@ func readBytes(buf *BufRead) string {
|
|||
nb := 0;
|
||||
for {
|
||||
c, e := buf.ReadByte();
|
||||
if e == EndOfFile {
|
||||
if e == io.ErrEOF {
|
||||
break
|
||||
}
|
||||
if e != nil {
|
||||
|
|
@ -145,7 +145,7 @@ func reads(buf *BufRead, m int) string {
|
|||
for {
|
||||
n, e := buf.Read(b[nb:nb+m]);
|
||||
nb += n;
|
||||
if e == EndOfFile {
|
||||
if e == io.ErrEOF {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue