Change structure of VulnInfo.Pacakges to []string

This commit is contained in:
Kota Kanbe
2017-05-09 00:20:11 +09:00
committed by kota kanbe
parent 210e3dc990
commit b977558f38
9 changed files with 128 additions and 137 deletions

View File

@@ -193,9 +193,9 @@ func diff(curResults, preResults models.ScanResults) (diffed models.ScanResults,
packages := models.Packages{}
for _, s := range current.ScannedCves {
for _, pack := range s.Packages {
p := current.Packages[pack.Name]
packages[pack.Name] = p
for _, name := range s.PackageNames {
p := current.Packages[name]
packages[name] = p
}
}
current.Packages = packages