Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [ Iterator returns end of file instead of scanner error] #26

Open
baki077 opened this issue Jan 20, 2023 · 0 comments
Open

[BUG] [ Iterator returns end of file instead of scanner error] #26

baki077 opened this issue Jan 20, 2023 · 0 comments

Comments

@baki077
Copy link

baki077 commented Jan 20, 2023

I got EOF before the real end of my file and reason is that the scanned line exceeded the size of the buffer (bufio.MaxScanTokenSize) So the scanner return false but sets the error into the scanner.Err() return

file pkg/jsonl/iterator.go

In the iterator you don't check if the scanner has an error

//line 92
if it.Scanner.Scan() {
// parse line code
}
// Here you have to check it.Scanner.Err()
// line 122 return nil, io.EOF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant