diff options
Diffstat (limited to 'config.go')
| -rw-r--r-- | config.go | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -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 } |
