IsManagedExtensionUsed checks whether a configuration namespace in the named extension namespaces list is used in the user-provided configuration
(name string, userConfigs map[string]string)
| 441 | // IsManagedExtensionUsed checks whether a configuration namespace in the named extension namespaces list |
| 442 | // is used in the user-provided configuration |
| 443 | func IsManagedExtensionUsed(name string, userConfigs map[string]string) bool { |
| 444 | var extension *ManagedExtension |
| 445 | for _, ext := range ManagedExtensions { |
| 446 | if ext.Name == name { |
| 447 | extension = &ext |
| 448 | break |
| 449 | } |
| 450 | } |
| 451 | if extension == nil { |
| 452 | return false |
| 453 | } |
| 454 | |
| 455 | return extension.IsUsed(userConfigs) |
| 456 | } |
| 457 | |
| 458 | var ( |
| 459 | // ManagedExtensions contains the list of extensions the operator supports to manage |
no test coverage detected