We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83e12cd commit bd2ac2cCopy full SHA for bd2ac2c
1 file changed
vulndb/gob_types.go
@@ -121,12 +121,12 @@ func gobExploitToModel(g GobExploit) models.Exploit {
121
}
122
123
func gobExploitsToModels(gs []GobExploit, lastImportTime time.Time) []models.Exploit {
124
- out := make([]models.Exploit, len(gs))
125
- for i, g := range gs {
+ out := make([]models.Exploit, 0, len(gs))
+ for _, g := range gs {
126
if g.Updated != nil && g.Updated.Before(lastImportTime) {
127
continue
128
129
- out[i] = gobExploitToModel(g)
+ out = append(out, gobExploitToModel(g))
130
131
return out
132
0 commit comments