fix: filter result if exported data is empty

This commit is contained in:
ᴍᴏᴏɴD4ʀᴋ
2022-06-05 15:27:14 +08:00
parent d1ae09d9e4
commit 7b8e2a3fd2
9 changed files with 85 additions and 11 deletions
+15 -7
View File
@@ -76,10 +76,23 @@ func getBookmarkChildren(value gjson.Result, w *ChromiumBookmark) (children gjso
return children
}
func bookmarkType(a int64) string {
switch a {
case 1:
return "url"
default:
return "folder"
}
}
func (c *ChromiumBookmark) Name() string {
return "bookmark"
}
func (c *ChromiumBookmark) Length() int {
return len(*c)
}
type FirefoxBookmark []bookmark
const (
@@ -134,11 +147,6 @@ func (f *FirefoxBookmark) Name() string {
return "bookmark"
}
func bookmarkType(a int64) string {
switch a {
case 1:
return "url"
default:
return "folder"
}
func (f *FirefoxBookmark) Length() int {
return len(*f)
}