go-syslog
go-syslog copied to clipboard
Data race on currentid
https://github.com/influxdata/go-syslog/blob/ac565dc76ba6bb17b47140fb74355d1de7f19307/rfc5424/builder.go#L64-L65
Those two variables are defined on the package level. That means that two independent rfc5424.SyslogMessage objects with structured data can't be built concurrently – race detector correctly reports unsynchronised writes.
You're right, thanks for spotting it!
The fix is not that difficult but I don't have any spare time to do it. Would love to review a PR, tho!