I have a really puzzling problem with the filepath.Walk function. It only seems to find directories with that are DOT files. Such as .AndroidStudio or .arduino. It does not file any files or directories other than those if I set the root to something like /home/charles
//Watches ...Recursively walk the filesystem, entrypoint to file watching
func Watches(tops []string) {
dirSet := make(map[string]bool)
for _, top := range tops {
err := filepath.Walk(top, func(path string, f os.FileInfo, err error) error {
if err != nil {
log.Println(err)
return err
}
log.Println("File: ", path)
if f.IsDir() {
//Maps can only have one key that matches, duplicates will be overwritten
dirSet[path] = true
}
return nil
})
if err != nil {
log.Println(err)
}
}
}