func (cfg RunnerConfig) validate(log log.Logger) error {
	switch {
	case log == nil:
		return fmt.Errorf("log required")
	case cfg.MaxPlayerSockets < 1:
		return fmt.Errorf("each player must be able to open at least one socket")
	case cfg.MaxSockets < cfg.MaxPlayerSockets:
		return fmt.Errorf("players cannot create more sockets than the runner allows")
	}
	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) error {
	switch {
	case log == nil:
		return fmt.Errorf("log required")
	case cfg.MaxPlayerSockets < 1:
		return fmt.Errorf("each player must be able to open at least one socket")
	case cfg.MaxSockets < cfg.MaxPlayerSockets:
		return fmt.Errorf("players cannot create more sockets than the runner allows")
	}
	return nil
}
func ( cfg RunnerConfig ) validate ( log log . Logger ) error { switch { case log == nil : return fmt . Errorf ( " " ) case cfg . MaxPlayerSockets < 1 : return fmt . Errorf ( " " ) case cfg . MaxSockets < cfg . MaxPlayerSockets : return fmt . Errorf ( " " ) } return nil }
validate ensures the configuration has no errors.
validate ensures the configuration has no errors .