code: func (c *Config) ValidateAndInjectDefaults() error {
  
  	min := defaultMinDelaySeconds
  	max := defaultMaxDelaySeconds
  
  	// reject bad min/max values
  	if c.Polling.MaxDelaySeconds != nil && c.Polling.MinDelaySeconds != nil {
  		if *c.Polling.MaxDelaySeconds < *c.Polling.MinDelaySeconds {
  			return fmt.Errorf("max polling delay must be >= min polling delay")
  		}
  		min = *c.Polling.MinDelaySeconds
  		max = *c.Polling.MaxDelaySeconds
  	} else if c.Polling.MaxDelaySeconds == nil && c.Polling.MinDelaySeconds != nil {
  		return fmt.Errorf("polling configuration missing 'max_delay_seconds'")
  	} else if c.Polling.MinDelaySeconds == nil && c.Polling.MaxDelaySeconds != nil {
  		return fmt.Errorf("polling configuration missing 'min_delay_seconds'")
  	}
  
  	// scale to seconds
  	minSeconds := int64(time.Duration(min) * time.Second)
  	c.Polling.MinDelaySeconds = &minSeconds
  
  	maxSeconds := int64(time.Duration(max) * time.Second)
  	c.Polling.MaxDelaySeconds = &maxSeconds
  
  	return nil
  
  }
docs: // ValidateAndInjectDefaults checks for configuration errors and ensures all
  // values are set on the Config object.