I want to scan a reader and skip any tokens that will fire bufio.ErrTooLong. Here's an example of what I have to do with the existing implementation of scanner: https://play.golang.org/p/LimudFrPRC4.
I'd like to have the option for scanner to skip tokens that are too long. I think adding a variable to scanner like skipTooLongTokens bool, set via a call to scanner.SetFlags(bufio.LSkipTooLongTokens) or something like that, would be very helpful.