()
| 10 | ) |
| 11 | |
| 12 | func main() { |
| 13 | var config types.Config |
| 14 | var watchers = make([]watcher.Interface, 0) |
| 15 | needReprint := make(chan bool) |
| 16 | _, err := toml.DecodeFile("multiwatch.toml", &config) |
| 17 | if err != nil { |
| 18 | log.Fatal(err) |
| 19 | } |
| 20 | for _, watchConfig := range config.Watch { |
| 21 | dirWatcher := watcher.NewWatcher(watchConfig) |
| 22 | dirWatcher.Run(needReprint) |
| 23 | watchers = append(watchers, dirWatcher) |
| 24 | } |
| 25 | |
| 26 | var statusPrinter = printer.NewPrinter() |
| 27 | statusPrinter.RegisterWatchers(watchers) |
| 28 | statusPrinter.Start(needReprint) |
| 29 | needReprint <- true |
| 30 | |
| 31 | select {} |
| 32 | } |
nothing calls this directly
no test coverage detected