func saveChromeExtension() error { exportPath := filepath.Join(osutil.HomePath(), "AlkasirChromeExtension") if err := os.RemoveAll(exportPath); err != nil { lg.Errorln(err) } err := chrome.RestoreAssets(exportPath, "") if err != nil { return err } return nil }
// ConfigPath returns a location for a file or path settings directory func ConfigPath(file ...string) string { var paths []string paths = append(paths, osutil.HomePath()) if runtime.GOOS == "windows" { paths = append(paths, "alkasir") } else { paths = append(paths, ".alkasir") } if len(file) > 0 { paths = append(paths, file...) } return filepath.Join(paths...) }