func filesUpdated(set set.Set) { fmt.Println("Updated:") toRun.Clear() for file := range set.Iter() { fmt.Println(file) filestr, ok := file.(string) if !ok { fmt.Println("Error converting to string:\n", file) continue } for _, entry := range config { for _, pattern := range entry.Files { if toRun.Contains(entry.Name) { break } match, err := glob.Match(pattern, filestr) if err != nil { fmt.Println(err) continue } if match { toRun.Add(entry.Name) } } } } run() }