Merge pull request #234 from jmorganca/fix-parse-license

use max scan token size to hold large objects
This commit is contained in:
Michael Yang 2023-07-28 12:03:51 -07:00 committed by GitHub
commit fc40a4f166
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()