fix "range-loop variables always have the same address"
This commit is contained in:
parent
844dc7b384
commit
09987ba4ce
1 changed files with 2 additions and 1 deletions
|
@ -26,11 +26,12 @@ func dedupAlerts(alerts []types.RuntimeAlert) ([]*models.Alert, error) {
|
|||
continue
|
||||
}
|
||||
|
||||
for k, src := range alert.Sources {
|
||||
for k := range alert.Sources {
|
||||
refsrc := *alert.Alert // copy
|
||||
|
||||
log.Tracef("source[%s]", k)
|
||||
|
||||
src := alert.Sources[k]
|
||||
refsrc.Source = &src
|
||||
dedupCache = append(dedupCache, &refsrc)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue