fix: remove a validation of hipchat (#609)
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user