File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 4
4
"strings"
5
5
"time"
6
6
7
- "github.com/go-fsnotify /fsnotify"
7
+ "github.com/clipperhouse /fsnotify"
8
8
)
9
9
10
10
func watch (c config ) error {
@@ -41,7 +41,7 @@ func watch(c config) error {
41
41
events = append (events , event )
42
42
}
43
43
case loopErr = <- watcher .Errors :
44
- done <- struct {}{}
44
+ break Loop
45
45
case <- tick :
46
46
if len (events ) == 0 {
47
47
continue
@@ -50,14 +50,12 @@ func watch(c config) error {
50
50
// stop watching while gen'ing files
51
51
loopErr = watcher .Remove (dir )
52
52
if loopErr != nil {
53
- done <- struct {}{}
54
53
break Loop
55
54
}
56
55
57
56
// gen the files
58
57
loopErr = run (c )
59
58
if loopErr != nil {
60
- done <- struct {}{}
61
59
break Loop
62
60
}
63
61
@@ -67,13 +65,11 @@ func watch(c config) error {
67
65
// resume watching
68
66
loopErr = watcher .Add (dir )
69
67
if loopErr != nil {
70
- done <- struct {}{}
71
68
break Loop
72
69
}
73
- case <- done :
74
- break Loop
75
70
}
76
71
}
72
+ done <- struct {}{}
77
73
}()
78
74
79
75
<- done
You can’t perform that action at this time.
0 commit comments