Use literal string for regexp pattern

This commit is contained in:
Cameron Moore
2016-04-18 17:14:18 -05:00
parent 6e26017b00
commit 92c565e02b
+1 -1
View File
@@ -591,7 +591,7 @@ func (l *tomlLexer) run() {
}
func init() {
dateRegexp = regexp.MustCompile("^\\d{1,4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?(Z|[+-]\\d{2}:\\d{2})")
dateRegexp = regexp.MustCompile(`^\d{1,4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?(Z|[+-]\d{2}:\d{2})`)
}
// Entry point