in lib/notifiers/notifiers.go [438:453]
func validateConfig(cfg *Config) error {
if allowed := allowedYAMLAPIVersions[cfg.APIVersion]; !allowed {
return fmt.Errorf("expected `apiVersion` %q to be one of the following:\n%v",
cfg.APIVersion, allowedYAMLAPIVersions)
}
if cfg.Spec == nil {
return errors.New("expected config.spec to be present")
}
if cfg.Spec.Notification == nil {
return errors.New("expected config.spec.notification to be present")
}
return nil
}