Skip to content

Commit 80a51f2

Browse files
committed
parser/gotest: Move const declaration to top of file
1 parent 3d712f2 commit 80a51f2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

parser/gotest/gotest.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ import (
1414
"github.com/jstemmer/go-junit-report/v2/gtr"
1515
)
1616

17+
const (
18+
// maxLineSize is the maximum amount of bytes we'll read for a single line.
19+
// Lines longer than maxLineSize will be truncated.
20+
maxLineSize = 4 * 1024 * 1024
21+
)
22+
1723
var (
1824
// regexBenchInfo captures 3-5 groups: benchmark name, number of times ran, ns/op (with or without decimal), MB/sec (optional), B/op (optional), and allocs/op (optional).
1925
regexBenchmark = regexp.MustCompile(`^(Benchmark[^ -]+)$`)
@@ -102,12 +108,6 @@ func SetSubtestMode(mode SubtestMode) Option {
102108
}
103109
}
104110

105-
const (
106-
// maxLineSize is the maximum amount of bytes we'll read for a single line.
107-
// Lines longer than maxLineSize will be truncated.
108-
maxLineSize = 4 * 1024 * 1024
109-
)
110-
111111
// Parser is a Go test output Parser.
112112
type Parser struct {
113113
packageName string

0 commit comments

Comments
 (0)