summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvan Jegen <s.jegen@gmail.com>2017-02-22 19:24:18 +0100
committerSilvan Jegen <s.jegen@gmail.com>2017-02-22 19:24:18 +0100
commit3d561a2ebdf31ce794e21cacf6789b844fece86d (patch)
treed3536d9ab0593c749a4e8c448012f5f056ebee22
parentb49c4f1206521f7ae7fea46efc383e8d31fb007d (diff)
Return early on errorHEADmaster
-rw-r--r--manager/manager.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/manager/manager.go b/manager/manager.go
index 2a58aab..30c20a6 100644
--- a/manager/manager.go
+++ b/manager/manager.go
@@ -28,17 +28,17 @@ func (m *Manager) Run() {
wg.Add(1)
go func(w *work.Work) {
+ defer wg.Done()
nw := m.Filter.Filter(w)
err := nw.Error()
if err != nil {
fmt.Printf("Got an error when filtering Work: %q\n", err)
+ return
}
err = m.Output.Output(nw)
if err != nil {
fmt.Printf("Got an error when outputting Work: %q\n", err)
}
-
- wg.Done()
}(w)
}