mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-17 16:38:54 +00:00
Miller produces no output on TSV with > 64K characters per line (#1505)
* Switch to bufio.Reader, first pass * temp * Simplify ILineReader by making it stateless * Interface not necessary; ILineReader -> TLineReader * neaten * iterating
This commit is contained in:
parent
57b32c3e9b
commit
3ff43fa818
6 changed files with 198 additions and 66 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"container/list"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
|
|
@ -149,8 +150,17 @@ func channelizedStanzaScanner(
|
|||
stanzas := list.New()
|
||||
stanza := newStanza()
|
||||
|
||||
for lineReader.Scan() {
|
||||
line := lineReader.Text()
|
||||
for {
|
||||
line, err := lineReader.Read()
|
||||
if err != nil {
|
||||
if lib.IsEOF(err) {
|
||||
done = true
|
||||
break
|
||||
} else {
|
||||
fmt.Fprintf(os.Stderr, "mlr: %#v\n", err)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// Check for comments-in-data feature
|
||||
// TODO: function-pointer this away
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue