Remove CRUD funcs of CveContents

This commit is contained in:
Kota Kanbe
2017-05-10 11:43:10 +09:00
committed by kota kanbe
parent dd5a7920e5
commit b285cb0e57
5 changed files with 12 additions and 47 deletions

View File

@@ -513,7 +513,7 @@ func fillCveDetail(r *models.ScanResult) error {
}
for _, con := range []models.CveContent{*nvd, *jvn} {
if !con.Empty() {
vinfo.CveContents.Upsert(con)
vinfo.CveContents[con.Type] = con
}
}
r.ScannedCves[cveID] = vinfo

View File

@@ -239,7 +239,7 @@ func isCveInfoUpdated(cveID string, previous, current models.ScanResult) bool {
for _, c := range previous.ScannedCves {
if cveID == c.CveID {
for _, cType := range cTypes {
content, _ := c.CveContents.Get(cType)
content, _ := c.CveContents[cType]
prevLastModified[cType] = content.LastModified
}
break
@@ -250,7 +250,7 @@ func isCveInfoUpdated(cveID string, previous, current models.ScanResult) bool {
for _, c := range current.ScannedCves {
if cveID == c.CveID {
for _, cType := range cTypes {
content, _ := c.CveContents.Get(cType)
content, _ := c.CveContents[cType]
curLastModified[cType] = content.LastModified
}
break