func (cfg RunnerConfig) validate(log log.Logger, WordValidator WordValidator, userDao UserDao) error {
	switch {
	case log == nil:
		return fmt.Errorf("log required")
	case WordValidator == nil:
		return fmt.Errorf("word validator required")
	case userDao == nil:
		return fmt.Errorf("user dao required")
	case cfg.MaxGames < 1:
		return fmt.Errorf("must be able to create at least one game")
	}
	return nil
}
// validate ensures the configuration has no errors.
validate ensures the configuration has no errors.
// validate ensures the configuration has no errors .
func (cfg RunnerConfig) validate(log log.Logger, WordValidator WordValidator, userDao UserDao) error {
	switch {
	case log == nil:
		return fmt.Errorf("log required")
	case WordValidator == nil:
		return fmt.Errorf("word validator required")
	case userDao == nil:
		return fmt.Errorf("user dao required")
	case cfg.MaxGames < 1:
		return fmt.Errorf("must be able to create at least one game")
	}
	return nil
}
func ( cfg RunnerConfig ) validate ( log log . Logger , WordValidator WordValidator , userDao UserDao ) error { switch { case log == nil : return fmt . Errorf ( " " ) case WordValidator == nil : return fmt . Errorf ( " " ) case userDao == nil : return fmt . Errorf ( " " ) case cfg . MaxGames < 1 : return fmt . Errorf ( " " ) } return nil }
validate ensures the configuration has no errors.
validate ensures the configuration has no errors .