MCPcopy Create free account
hub / github.com/Enapiuz/multiwatch / main

Function main

main.go:12–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10)
11
12func 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}

Callers

nothing calls this directly

Calls 3

RunMethod · 0.95
RegisterWatchersMethod · 0.80
StartMethod · 0.80

Tested by

no test coverage detected