We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d888bfa + d074dea commit 2c9877dCopy full SHA for 2c9877d
expfmt/text_parse.go
@@ -142,9 +142,13 @@ func (p *TextParser) reset(in io.Reader) {
142
func (p *TextParser) startOfLine() stateFn {
143
p.lineCount++
144
if p.skipBlankTab(); p.err != nil {
145
- // End of input reached. This is the only case where
146
- // that is not an error but a signal that we are done.
147
- p.err = nil
+ // This is the only place that we expect to see io.EOF,
+ // which is not an error but the signal that we are done.
+ // Any other error that happens to align with the start of
148
+ // a line is still an error.
149
+ if p.err == io.EOF {
150
+ p.err = nil
151
+ }
152
return nil
153
}
154
switch p.currentByte {
0 commit comments