feat: add cli options

This commit is contained in:
ᴍᴏᴏɴD4ʀᴋ
2022-04-12 18:23:02 +08:00
parent 62b8ebd387
commit 9cd2f61f1b
5 changed files with 70 additions and 120 deletions
+4 -2
View File
@@ -40,7 +40,7 @@ func (c *ChromiumBookmark) Parse(masterKey []byte) error {
return true
})
}
// TODO: 使用泛型重构
// TODO: refactor with go generics
sort.Slice(*c, func(i, j int) bool {
return (*c)[i].DateAdded.After((*c)[j].DateAdded)
})
@@ -95,7 +95,9 @@ func (f *FirefoxBookmark) Parse(masterKey []byte) error {
defer os.Remove(item.TempFirefoxBookmark)
defer keyDB.Close()
_, err = keyDB.Exec(closeJournalMode)
if err != nil {
log.Error(err)
}
bookmarkRows, err = keyDB.Query(queryFirefoxBookMark)
if err != nil {
return err