feat: add multiple user for chromium

This commit is contained in:
ᴍᴏᴏɴD4ʀᴋ
2022-06-05 14:04:39 +08:00
parent 0cde56c6e6
commit e6aa1f0c61
4 changed files with 83 additions and 16 deletions
+5
View File
@@ -115,6 +115,11 @@ func Filename(browser, item, ext string) string {
return strings.ToLower(fmt.Sprintf("%s_%s.%s", replace.Replace(browser), item, ext))
}
func BrowserName(browser, user string) string {
replace := strings.NewReplacer(" ", "_", ".", "_", "-", "_", "Profile", "User")
return strings.ToLower(fmt.Sprintf("%s_%s", replace.Replace(browser), replace.Replace(user)))
}
// ParentDir returns the parent directory of the provided path
func ParentDir(p string) string {
return filepath.Dir(filepath.Clean(p))