mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-29 19:29:28 +02:00
sort result
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"hack-browser-data/log"
|
||||
"hack-browser-data/utils"
|
||||
"os"
|
||||
"sort"
|
||||
|
||||
"github.com/jszwec/csvutil"
|
||||
)
|
||||
@@ -143,3 +144,13 @@ func (b BrowserData) OutPutJson(dir, browser, format string) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b BrowserData) Sorted() {
|
||||
sort.Slice(b.BookmarkSlice, func(i, j int) bool {
|
||||
return b.BookmarkSlice[i].ID < b.BookmarkSlice[j].ID
|
||||
})
|
||||
sort.Slice(b.HistorySlice, func(i, j int) bool {
|
||||
return b.HistorySlice[i].VisitCount > b.HistorySlice[j].VisitCount
|
||||
})
|
||||
sort.Sort(b.LoginDataSlice)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user