Increase max line length for KatiReader bufio.Scanner

bufio.Scanner defaults to a relatively small max line length of
64kB.  Kati output may have long lines, use a max length of 2MB
instead.

Fixes: 123590367
Test: m checkbuild
Change-Id: Ia869c5c2526621244f0065736e0d5fd9a088df06
This commit is contained in:
Colin Cross 2019-01-30 14:20:45 -08:00
parent 0425aa13ec
commit 75ec1ec13f

View file

@ -121,6 +121,7 @@ func KatiReader(st ToolStatus, pipe io.ReadCloser) {
}
scanner := bufio.NewScanner(pipe)
scanner.Buffer(nil, 2*1024*1024)
for scanner.Scan() {
parser.parseLine(scanner.Text())
}