// mergeVulnerability updates the target vulnerability structure using the specified one. func mergeVulnerability(target, source *database.Vulnerability) { if source.Link != "" { target.Link = source.Link } if source.Description != "" { target.Description = source.Description } if source.Priority.Compare(target.Priority) > 0 { target.Priority = source.Priority } for _, node := range source.FixedInNodes { if !utils.Contains(node, target.FixedInNodes) { target.FixedInNodes = append(target.FixedInNodes, node) } } }