fix bug with Event.Copy() not deep copying event
This commit is contained in:
parent
82bafff852
commit
8924cd4a17
5
event.go
5
event.go
@ -134,6 +134,11 @@ func (e *Event) Copy() *Event {
|
|||||||
*newEvent.Source = *e.Source
|
*newEvent.Source = *e.Source
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Copy Params in order to dereference as well.
|
||||||
|
if e.Params != nil {
|
||||||
|
copy(newEvent.Params, e.Params)
|
||||||
|
}
|
||||||
|
|
||||||
// Copy tags as necessary.
|
// Copy tags as necessary.
|
||||||
if e.Tags != nil {
|
if e.Tags != nil {
|
||||||
newEvent.Tags = Tags{}
|
newEvent.Tags = Tags{}
|
||||||
|
Loading…
Reference in New Issue
Block a user