code: func ConfigToClient(config interface{}) (Client, error) {
  	switch cfg := config.(type) {
  	case NodeConfig:
  		return CreateNodeClient(cfg)
  	case ClusterConfig:
  		return CreateClusterClient(cfg)
  	case SentinelConfig:
  		return CreateSentinelClient(cfg)
  	case nil:
  		return nil, fmt.Errorf("Configuration cannot be nil")
  	}
  	return nil, fmt.Errorf("Unknown configuration type %T", config)
  }
docs: // ConfigToClient creates an appropriate client according to the configuration
  // parameter.