code: func (config *DirectClientConfig) getCluster() (clientcmdapi.Cluster, error) {
  	clusterInfos := config.config.Clusters
  	clusterInfoName, required := config.getClusterName()
  
  	mergedClusterInfo := clientcmdapi.NewCluster()
  	mergo.MergeWithOverwrite(mergedClusterInfo, config.overrides.ClusterDefaults)
  	if configClusterInfo, exists := clusterInfos[clusterInfoName]; exists {
  		mergo.MergeWithOverwrite(mergedClusterInfo, configClusterInfo)
  	} else if required {
  		return clientcmdapi.Cluster{}, fmt.Errorf("cluster %q does not exist", clusterInfoName)
  	}
  	mergo.MergeWithOverwrite(mergedClusterInfo, config.overrides.ClusterInfo)
  	// An override of --insecure-skip-tls-verify=true and no accompanying CA/CA data should clear already-set CA/CA data
  	// otherwise, a kubeconfig containing a CA reference would return an error that "CA and insecure-skip-tls-verify couldn't both be set"
  	caLen := len(config.overrides.ClusterInfo.CertificateAuthority)
  	caDataLen := len(config.overrides.ClusterInfo.CertificateAuthorityData)
  	if config.overrides.ClusterInfo.InsecureSkipTLSVerify && caLen == 0 && caDataLen == 0 {
  		mergedClusterInfo.CertificateAuthority = ""
  		mergedClusterInfo.CertificateAuthorityData = nil
  	}
  
  	return *mergedClusterInfo, nil
  }
docs: // getCluster returns the clientcmdapi.Cluster, or an error if a required cluster is not found.