─── Known-parameter validation ─────────────────────────────────────────────── ValidateEffortParam validates the "effort" parameter value (V-MAF-002). Allowed values: low, medium, high.
(value string)
| 39 | // ValidateEffortParam validates the "effort" parameter value (V-MAF-002). |
| 40 | // Allowed values: low, medium, high. |
| 41 | func ValidateEffortParam(value string) error { |
| 42 | switch value { |
| 43 | case "low", "medium", "high": |
| 44 | return nil |
| 45 | default: |
| 46 | return fmt.Errorf("model parameter 'effort': value %q is not valid; allowed values are: low, medium, high (V-MAF-002)", value) |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | // ValidateTemperatureParam validates the "temperature" parameter value (V-MAF-003). |
| 51 | // Must be a finite decimal float in [0.0, 2.0]. |