diff --git a/config/config.go b/config/config.go index eb188830..25895300 100644 --- a/config/config.go +++ b/config/config.go @@ -264,10 +264,6 @@ func (c Config) ValidateOnReport() bool { errs = append(errs, slackerrs...) } - if hipchaterrs := c.HipChat.Validate(); 0 < len(hipchaterrs) { - errs = append(errs, hipchaterrs...) - } - if syslogerrs := c.Syslog.Validate(); 0 < len(syslogerrs) { errs = append(errs, syslogerrs...) } @@ -459,25 +455,7 @@ func (c *SlackConf) Validate() (errs []error) { // HipChatConf is HipChat config type HipChatConf struct { AuthToken string `json:"AuthToken"` - Room string `json:"Room"` -} - -// Validate validates configuration -func (c *HipChatConf) Validate() (errs []error) { - if len(c.Room) == 0 { - errs = append(errs, fmt.Errorf("room must not be empty")) - } - - if len(c.AuthToken) == 0 { - errs = append(errs, fmt.Errorf("AuthToken must not be empty")) - } - - _, err := valid.ValidateStruct(c) - if err != nil { - errs = append(errs, err) - } - - return + Room string `json:"Room"` } // SyslogConf is syslog config