From 86ba551e075fc78886f44d4c2b8d716276c62b86 Mon Sep 17 00:00:00 2001 From: Kota Kanbe Date: Wed, 7 Mar 2018 05:21:57 +0900 Subject: [PATCH] fix: remove a validation of hipchat (#609) --- config/config.go | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) 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