Skip to content
Permalink
Browse files

Remove sort function

  • Loading branch information...
spiegel-im-spiegel committed Mar 23, 2018
1 parent f182725 commit 73006dae0f5cabe91906ac7641cd9c5bea105a6c
Showing with 6 additions and 19,121 deletions.
  1. +6 −0 cli/vulnlist/main.go
  2. +0 −18,519 cli/vulnlist/res.txt
  3. +0 −12 vuldef/vuldef.go
  4. +0 −590 vuldef/vuldef_test.go
@@ -3,6 +3,7 @@ package main
import (
"fmt"
"os"
"sort"
"time"

"github.com/spiegel-im-spiegel/go-myjvn"
@@ -91,6 +92,11 @@ func run(start, end time.Time) {
}
}
if vulnInfo != nil {
//sort by DateLastUpdated
sort.Slice(vulnInfo.Vulinfo, func(i int, j int) bool {
return vulnInfo.Vulinfo[i].VulinfoData.DateLastUpdated.Before(vulnInfo.Vulinfo[j].VulinfoData.DateLastUpdated.Time)
})
//encode to JSON
json, err := vulnInfo.JSON("")
if err != nil {
fmt.Fprintln(os.Stderr, err)

0 comments on commit 73006da

Please sign in to comment.
You can’t perform that action at this time.