Yes, that's a much better solution. On Friday, October 13, 2023 at 8:40:45 PM UTC+1 Ian Lance Taylor wrote:
> On Thu, Oct 12, 2023 at 11:42 PM 'Mark' via golang-nuts > <golan...@googlegroups.com> wrote: > > > > Yes, I can see now. > > > > Perhaps consider changing: > > > > Programs that need more control over error handling or large tokens, or > must run sequential scans on a reader, should use bufio.Reader instead. > > > > to: > > > > Programs that need more control over error handling or large tokens > (such as lines longer than MaxScanTokenSize), or must run sequential scans > on a reader, should use bufio.Reader instead. > > Thanks, instead of that I added a link to Scanner.Buffer > (https://go.dev/cl/535216). I hope that will help guide people in the > right direction. > > Ian > > > > On Thursday, October 12, 2023 at 8:56:05 PM UTC+1 Ian Lance Taylor wrote: > >> > >> On Thu, Oct 12, 2023 at 10:21 AM 'Mark' via golang-nuts > >> <golan...@googlegroups.com> wrote: > >> > > >> > The docs for bufio.Scanner do say > >> > "Programs that need more control over error handling or large tokens, > or must run sequential scans on a reader, should use bufio.Reader instead" > >> > Perhaps it would be more helpful to mention what the token length > limit is? > >> > >> It's MaxScanTokenSize: https://pkg.go.dev/bufio#pkg-constants . See > >> also https://pkg.go.dev/bufio#Scanner.Buffer . > >> > >> Ian > > > > -- > > 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 golang-nuts...@googlegroups.com. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/0392f8b3-a006-4bc0-aa54-3759aa0d3b7en%40googlegroups.com > . > -- 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/a74e8c1b-e11e-4f5d-b66c-43bef18e1715n%40googlegroups.com.