aboutsummaryrefslogtreecommitdiff
path: root/worker.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker.go')
-rw-r--r--worker.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/worker.go b/worker.go
index 48c78c6..83f91da 100644
--- a/worker.go
+++ b/worker.go
@@ -7,7 +7,6 @@ import (
"os"
"path/filepath"
"strings"
- "sync"
"git.sr.ht/~shulhan/pakakeh.go/lib/ini"
)
@@ -19,8 +18,7 @@ type worker struct {
reportq chan ScanReport
- Reports Reports
- reportsMutex sync.Mutex
+ Reports Reports
}
func newWorker(configDir string) (wrk *worker, err error) {
@@ -114,12 +112,7 @@ func (wrk *worker) start(updateq chan<- struct{}) {
if !ok {
break
}
-
- wrk.reportsMutex.Lock()
- var svcReport = wrk.Reports.Services[scanReport.Name]
- svcReport.Store(scanReport)
- wrk.reportsMutex.Unlock()
-
+ wrk.Reports.Store(scanReport)
updateq <- struct{}{}
}
}