aboutsummaryrefslogtreecommitdiff
path: root/cmd/moncheck/main.go
diff options
context:
space:
mode:
authorGibheer <gibheer+git@zero-knowledge.org>2021-12-02 17:53:47 +0100
committerGibheer <gibheer+git@zero-knowledge.org>2021-12-02 17:53:47 +0100
commit41d4805d584161ca16b8187194385e47c36422a6 (patch)
tree155d4afbe7fee96ffc23d2a61223b52ec6e1565d /cmd/moncheck/main.go
parentb69cd1ea3e2894ebe5afd189c8719836b7ed7aa6 (diff)
cmd/moncheck - fix missing return value
Diffstat (limited to 'cmd/moncheck/main.go')
-rw-r--r--cmd/moncheck/main.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/moncheck/main.go b/cmd/moncheck/main.go
index b987186..73eee1a 100644
--- a/cmd/moncheck/main.go
+++ b/cmd/moncheck/main.go
@@ -16,7 +16,6 @@ import (
"time"
"git.zero-knowledge.org/gibheer/monzero"
- "github.com/lib/pq"
)
var (
@@ -71,13 +70,16 @@ func main() {
log.Fatalf("could not resolve hostname: %s", err)
}
- checker := monzero.NewChecker(monzero.CheckerConfig{
- CheckerID: cfg.CheckerID,
+ checker, err := monzero.NewChecker(monzero.CheckerConfig{
+ CheckerID: config.CheckerID,
DB: db,
Timeout: timeout,
HostIdentifier: hostname,
Executor: monzero.CheckExec,
})
+ if err != nil {
+ log.Fatalf("could not create checker instance: %s", err)
+ }
for i := 0; i < config.Workers; i++ {
go check(checker, waitDuration)