Skip to content

Commit

Permalink
Increase buffer size (#351)
Browse files Browse the repository at this point in the history
* Increase buffer size

* Increase buffer to 1024
  • Loading branch information
pysysops authored and aelsabbahy committed May 21, 2018
1 parent b4d964d commit 6f0b489
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions resource/validate.go
Expand Up @@ -25,6 +25,10 @@ const (
SKIP
)

const (
maxScanTokenSize = 1024 * 1024
)

type TestResult struct {
Successful bool `json:"successful" yaml:"successful"`
ResourceId string `json:"resource-id" yaml:"resource-id"`
Expand Down Expand Up @@ -306,6 +310,7 @@ func ValidateContains(res ResourceRead, property string, expectedValues []string
}()

scanner := bufio.NewScanner(fh)
scanner.Buffer(nil, maxScanTokenSize)
var found []patternMatcher
for scanner.Scan() {
line := scanner.Text()
Expand Down

0 comments on commit 6f0b489

Please sign in to comment.