Every time data is written to a file, parseTime() must be called, and the regexp in the method must be initialized.
The more data is written, the greater the cumulative consumption.
Suggest initializing regexp and processing it globally.
`
func parseTime(input []byte) string {
var re = regexp.MustCompile(`"((\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(?:\.(\d{3}))\d*)(Z|[\+-]\d{2}:\d{2})"`)
var substitution = "\"$2 $3.$4\""
for re.Match(input) {
input = re.ReplaceAll(input, []byte(substitution))
}
return string(input)
Every time data is written to a file, parseTime() must be called, and the regexp in the method must be initialized. The more data is written, the greater the cumulative consumption. Suggest initializing regexp and processing it globally.
` func parseTime(input []byte) string {
} `