IsDefaultConfig returns true if the provided configuration matches the default
(config *restclient.Config)
| 336 | |
| 337 | // IsDefaultConfig returns true if the provided configuration matches the default |
| 338 | func (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 |
| 350 | func LoadFromFile(filename string) (*clientcmdapi.Config, error) { |
nothing calls this directly
no test coverage detected