1
0
Fork 0

Buffer stream rewrite

This commit is contained in:
Gregory Eremin 2015-02-23 20:09:36 +07:00
parent fc170098e9
commit 6f19875d32
1 changed files with 4 additions and 4 deletions

View File

@ -39,12 +39,12 @@ func (b *Buffer) Next() rune {
}
func (b *Buffer) stream() {
defer close(b.ready)
for {
if r, _, err := b.input.ReadRune(); err != nil {
close(b.ready)
break
} else {
if r, _, err := b.input.ReadRune(); err == nil {
b.ready <- r
} else {
return
}
}
}