DefaultSeverity returns the severity to use, falling back to fallback if empty.
(severity, fallback string)
| 27 | |
| 28 | // DefaultSeverity returns the severity to use, falling back to fallback if empty. |
| 29 | func DefaultSeverity(severity, fallback string) string { |
| 30 | if severity != "" { |
| 31 | return severity |
| 32 | } |
| 33 | return fallback |
| 34 | } |
| 35 | |
| 36 | // CheckIntervalMinutes returns the configured check interval for an alert type, or the fallback. |
| 37 | // This is used by the scheduler to dynamically set cron schedules for periodic alert checks. |
no outgoing calls
no test coverage detected