code: func (c *RootConfig) Validate(onExecution bool) error {
  	if onExecution {
  		if err := os.MkdirAll(c.LogDir, 0700); err != nil {
  			return errors.Wrapf(err, "invalid log_dir")
  		}
  	}
  
  	return nil
  }
docs: // Validate is the main entry point for root configuration validation.
  // The parameter `onExecution` specifies if the validation should include
  // execution checks. It returns an `error` on validation failure, otherwise
  // `nil`.