I'm reading Debian *Package files, some of which are over 1M lines long.
I used bufio.Scanner and found that it won't read past 1M lines (I'm using
Go 1.21.1 linux/amd64).
Is this a limitation of bufio.Scanner? If so then it ought to be in the
docs.
Or is it a bug?
Or maybe I made a mistake (although using bufio.Scanner seems easy)?
```
scanner := bufio.NewScanner(file)
lino := 1
for scanner.Scan() {
line := scanner.Text()
lino++
... // etc
}
```
Anyway, I've switched to using bufio.Reader and that works great.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/69f2fa03-c650-4c02-9470-51894dc56d1an%40googlegroups.com.