Skip to content

Commit

Permalink
fix(tests): Fix RFC3339 regex for log unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 authored Jan 24, 2022
1 parent 0a25d1a commit 9caea2a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/log/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
package log

// RFC3339 format
const timePrefixRegex = `^2[0-9]{3}-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]:[0-5][0-9]Z `
const timePrefixRegex = `([0-9]+)-` +
`(0[1-9]|1[012])-` +
`(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3])` +
`:([0-5][0-9])` +
`:([0-5][0-9]|60)(\.[0-9]+)?(([Zz])|([\+|\-]([01][0-9]|2[0-3])` +
`:[0-5][0-9])) `

func levelPtr(l Level) *Level { return &l }

Expand Down

0 comments on commit 9caea2a

Please sign in to comment.