getClusterName returns a string containing the default, or user-set cluster name, and a boolean indicating whether the default clusterName has been overwritten by a user-set flag, or left as its default value
()
| 397 | // indicating whether the default clusterName has been overwritten by a user-set flag, or left as |
| 398 | // its default value |
| 399 | func (config *DirectClientConfig) getClusterName() (string, bool) { |
| 400 | if len(config.overrides.Context.Cluster) != 0 { |
| 401 | return config.overrides.Context.Cluster, true |
| 402 | } |
| 403 | context, _ := config.getContext() |
| 404 | return context.Cluster, false |
| 405 | } |
| 406 | |
| 407 | // getContext returns the clientcmdapi.Context, or an error if a required context is not found. |
| 408 | func (config *DirectClientConfig) getContext() (clientcmdapi.Context, error) { |
no test coverage detected