getContextName returns the default, or user-set context name, and a boolean that indicates whether the default context name has been overwritten by a user-set flag, or left as its default value
()
| 372 | // getContextName returns the default, or user-set context name, and a boolean that indicates |
| 373 | // whether the default context name has been overwritten by a user-set flag, or left as its default value |
| 374 | func (config *DirectClientConfig) getContextName() (string, bool) { |
| 375 | if len(config.overrides.CurrentContext) != 0 { |
| 376 | return config.overrides.CurrentContext, true |
| 377 | } |
| 378 | if len(config.contextName) != 0 { |
| 379 | return config.contextName, false |
| 380 | } |
| 381 | |
| 382 | return config.config.CurrentContext, false |
| 383 | } |
| 384 | |
| 385 | // getAuthInfoName returns a string containing the current authinfo name for the current context, |
| 386 | // and a boolean indicating whether the default authInfo name is overwritten by a user-set flag, or |