MCPcopy Create free account
hub / github.com/ddev/ddev / IsValidPerformanceMode

Function IsValidPerformanceMode

pkg/config/types/performance_mode.go:40–46  ·  view source on GitHub ↗

IsValidPerformanceMode checks to see if the given performance mode option is valid.

(performanceMode string, configType ConfigType)

Source from the content-addressed store, hash-verified

38// IsValidPerformanceMode checks to see if the given performance mode
39// option is valid.
40func 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.

Callers 3

SetPerformanceModeMethod · 0.92
SetPerformanceModeMethod · 0.92

Calls 1

Tested by

no test coverage detected