Change structure of ScanResult.[]VulnInfo to Map

This commit is contained in:
Kota Kanbe
2017-05-09 21:03:54 +09:00
committed by kota kanbe
parent b977558f38
commit cfb848918f
12 changed files with 129 additions and 224 deletions

View File

@@ -291,10 +291,11 @@ func (l *base) convertToModel() models.ScanResult {
errs = append(errs, fmt.Sprintf("%s", e))
}
//TODO Remove
// Avoid null slice being null in JSON
for i := range l.VulnInfos {
l.VulnInfos[i].NilToEmpty()
}
// for cveID := range l.VulnInfos {
// l.VulnInfos[i].NilToEmpty()
// }
return models.ScanResult{
ServerName: l.ServerInfo.ServerName,