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

Function GetConfigFromFileOrDie

tools/clientcmd/config.go:483–490  ·  view source on GitHub ↗

GetConfigFromFileOrDie tries to read a kubeconfig file and if it can't, it calls exit. One exception, missing files result in empty configs, not an exit

(filename string)

Source from the content-addressed store, hash-verified

481
482// GetConfigFromFileOrDie tries to read a kubeconfig file and if it can't, it calls exit. One exception, missing files result in empty configs, not an exit
483func GetConfigFromFileOrDie(filename string) *clientcmdapi.Config {
484 config, err := getConfigFromFile(filename)
485 if err != nil {
486 klog.FatalDepth(1, err)
487 }
488
489 return config
490}

Callers

nothing calls this directly

Calls 1

getConfigFromFileFunction · 0.85

Tested by

no test coverage detected