From 9c7f30d31c51b8f1e245397e7f785e964c03820f Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Fri, 28 Jul 2023 11:43:25 -0700 Subject: [PATCH] use max scan token size to hold large objects --- parser/parser.go | 1 + 1 file changed, 1 insertion(+) diff --git a/parser/parser.go b/parser/parser.go index ec5cd95f..c89b13e6 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -24,6 +24,7 @@ func Parse(reader io.Reader) ([]Command, error) { var command, modelCommand Command scanner := bufio.NewScanner(reader) + scanner.Buffer(make([]byte, 0, bufio.MaxScanTokenSize), bufio.MaxScanTokenSize) scanner.Split(scanModelfile) for scanner.Scan() { line := scanner.Bytes()