Skip to content

Commit 37c66a3

Browse files
authored
Merge pull request #4 from AlexanderYastrebov/speedup-timestamp
Speed up containsTimestamp
2 parents 49b0847 + 4c5c620 commit 37c66a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

timestamp.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ func containsTimestamp(line string) bool {
99
line = line[:lookForTimestampLimit]
1010
}
1111
var digits, colons int
12-
for _, r := range line {
12+
for i := 0; i < len(line); i++ {
13+
r := line[i]
1314
switch {
1415
case r >= '0' && r <= '9':
1516
digits++

0 commit comments

Comments
 (0)