summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'config.go')
-rw-r--r--config.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/config.go b/config.go
index b79e275..660b49d 100644
--- a/config.go
+++ b/config.go
@@ -14,7 +14,7 @@ type config struct {
SMTPServer string `json:"omitempty"`
StateDir string `json:"omitempty"`
CheckTimeoutS int
- Checks []check
+ Checks map[string]check
}
func newConfig(configFile string) (config, error) {
@@ -53,13 +53,5 @@ func newConfig(configFile string) (config, error) {
log.Println("Set StateDir to " + config.StateDir)
}
- dedup := make(map[string]interface{})
- for _, check := range config.Checks {
- if _, ok := dedup[check.Name]; ok {
- return config, fmt.Errorf("Duplicate definition of check %s", check.Name)
- }
- dedup[check.Name] = struct{}{}
- }
-
return config, nil
}