diff options
Diffstat (limited to 'golings/cmd/watch.go')
-rw-r--r-- | golings/cmd/watch.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/golings/cmd/watch.go b/golings/cmd/watch.go index 01c8827..4693e3f 100644 --- a/golings/cmd/watch.go +++ b/golings/cmd/watch.go @@ -88,11 +88,9 @@ func WatchEvents(updateF chan<- string) { log.Fatal("Error in file path:", err.Error()) } - go func() { - for event := range watcher.Events { - if event.Has(fsnotify.Write) { - updateF <- event.Name - } + for event := range watcher.Events { + if event.Has(fsnotify.Write) { + updateF <- event.Name } - }() + } } |