Fix -to-slack

This commit is contained in:
Kota Kanbe
2017-05-29 10:50:39 +09:00
committed by kota kanbe
parent bc5a95ebb3
commit a14810bbd4
7 changed files with 295 additions and 238 deletions

View File

@@ -59,8 +59,8 @@ func (v VulnInfos) ToSortedSlice() (sorted []VulnInfo) {
sort.Slice(sorted, func(i, j int) bool {
maxI := sorted[i].CveContents.MaxCvssScore()
maxJ := sorted[j].CveContents.MaxCvssScore()
if maxI != maxJ {
return maxJ < maxI
if maxI.Value.Score != maxJ.Value.Score {
return maxJ.Value.Score < maxI.Value.Score
}
return sorted[i].CveID < sorted[j].CveID
})