Skip to content

Commit

Permalink
fix(models/cvecontents): a little more accurate sort (#2122)
Browse files Browse the repository at this point in the history
  • Loading branch information
shino authored Feb 5, 2025
1 parent 4e3ee6a commit b6a8b55
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions models/cvecontents.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ func (v CveContents) Sort() {
cmp.Compare(b.Cvss3Score, a.Cvss3Score),
cmp.Compare(b.Cvss2Score, a.Cvss2Score),
cmp.Compare(a.SourceLink, b.SourceLink),
cmp.Compare(a.Cvss40Vector, b.Cvss40Vector),
cmp.Compare(a.Cvss3Vector, b.Cvss3Vector),
cmp.Compare(a.Cvss2Vector, b.Cvss2Vector),
cmp.Compare(fmt.Sprintf("%#v", a.Optional), fmt.Sprintf("%#v", b.Optional)),
)
})
for cveID, cont := range contents {
Expand Down

0 comments on commit b6a8b55

Please sign in to comment.