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

Method IsDefaultConfig

tools/clientcmd/loader.go:338–347  ·  view source on GitHub ↗

IsDefaultConfig returns true if the provided configuration matches the default

(config *restclient.Config)

Source from the content-addressed store, hash-verified

336
337// IsDefaultConfig returns true if the provided configuration matches the default
338func (rules *ClientConfigLoadingRules) IsDefaultConfig(config *restclient.Config) bool {
339 if rules.DefaultClientConfig == nil {
340 return false
341 }
342 defaultConfig, err := rules.DefaultClientConfig.ClientConfig()
343 if err != nil {
344 return false
345 }
346 return reflect.DeepEqual(config, defaultConfig)
347}
348
349// LoadFromFile takes a filename and deserializes the contents into Config object
350func LoadFromFile(filename string) (*clientcmdapi.Config, error) {

Callers

nothing calls this directly

Calls 1

ClientConfigMethod · 0.65

Tested by

no test coverage detected