aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--golings/cmd/watch.go10
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
}
- }()
+ }
}