code: func GetConfig(context string, kubeconfig string) clientcmd.ClientConfig {
  	rules := clientcmd.NewDefaultClientConfigLoadingRules()
  	rules.DefaultClientConfig = &clientcmd.DefaultClientConfig
  
  	overrides := &clientcmd.ConfigOverrides{ClusterDefaults: clientcmd.ClusterDefaults}
  
  	if context != "" {
  		overrides.CurrentContext = context
  	}
  
  	if kubeconfig != "" {
  		rules.ExplicitPath = kubeconfig
  	}
  
  	return clientcmd.NewNonInteractiveDeferredLoadingClientConfig(rules, overrides)
  }
docs: // GetConfig returns a Kubernetes client config for a given context.