MCPcopy
hub / github.com/kubernetes/client-go / getAuthInfoName

Method getAuthInfoName

tools/clientcmd/client_config.go:388–394  ·  view source on GitHub ↗

getAuthInfoName returns a string containing the current authinfo name for the current context, and a boolean indicating whether the default authInfo name is overwritten by a user-set flag, or left as its default value

()

Source from the content-addressed store, hash-verified

386// and a boolean indicating whether the default authInfo name is overwritten by a user-set flag, or
387// left as its default value
388func (config *DirectClientConfig) getAuthInfoName() (string, bool) {
389 if len(config.overrides.Context.AuthInfo) != 0 {
390 return config.overrides.Context.AuthInfo, true
391 }
392 context, _ := config.getContext()
393 return context.AuthInfo, false
394}
395
396// getClusterName returns a string containing the default, or user-set cluster name, and a boolean
397// indicating whether the default clusterName has been overwritten by a user-set flag, or left as

Callers 3

ClientConfigMethod · 0.95
ConfirmUsableMethod · 0.95
getAuthInfoMethod · 0.95

Calls 1

getContextMethod · 0.95

Tested by

no test coverage detected