refactor: output browsing data package

This commit is contained in:
ᴍᴏᴏɴD4ʀᴋ
2022-04-18 00:47:39 +08:00
parent 13c92b0a2e
commit 04e620e54c
8 changed files with 58 additions and 35 deletions
+5
View File
@@ -8,6 +8,7 @@ import (
"os"
"path"
"path/filepath"
"strings"
"hack-browser-data/internal/item"
"hack-browser-data/internal/log"
@@ -61,6 +62,10 @@ func CopyItemToLocal(itemPaths map[item.Item]string) error {
return nil
}
func Filename(browser, item, ext string) string {
return strings.ToLower(fmt.Sprintf("%s_%s.%s", browser, item, ext))
}
func ParentDir(p string) string {
return filepath.Dir(p)
}