24 lines
545 B
Go
24 lines
545 B
Go
package process
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
)
|
|
|
|
func findHistoryFiles() []string {
|
|
//FIXME make this support safari one day
|
|
home := os.Getenv("HOME")
|
|
chromeDir := home + "/Library/Application Support/Google/Chrome"
|
|
defaultProfileDir := chromeDir + "/Default"
|
|
output := make([]string, 0)
|
|
output = append(output, defaultProfileDir+"/History")
|
|
otherProfiles, err := filepath.Glob(chromeDir + "/Profile *")
|
|
if err != nil {
|
|
return output
|
|
}
|
|
for _, v := range otherProfiles {
|
|
output = append(output, v+"/History")
|
|
}
|
|
return output
|
|
}
|