IsValidPerformanceMode checks to see if the given performance mode option is valid.
(performanceMode string, configType ConfigType)
| 38 | // IsValidPerformanceMode checks to see if the given performance mode |
| 39 | // option is valid. |
| 40 | func IsValidPerformanceMode(performanceMode string, configType ConfigType) bool { |
| 41 | if performanceMode == PerformanceModeEmpty { |
| 42 | return true |
| 43 | } |
| 44 | |
| 45 | return slices.Contains(ValidPerformanceModeOptions(configType), performanceMode) |
| 46 | } |
| 47 | |
| 48 | // CheckValidPerformanceMode checks to see if the given performance mode option |
| 49 | // is valid and returns an error in case the value is not valid. |
no test coverage detected