MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / SeverityRank

Function SeverityRank

server-source-code/internal/notifications/severity.go:6–19  ·  view source on GitHub ↗

SeverityRank maps severities for route filtering (higher = more urgent).

(s string)

Source from the content-addressed store, hash-verified

4
5// SeverityRank maps severities for route filtering (higher = more urgent).
6func SeverityRank(s string) int {
7 switch strings.ToLower(strings.TrimSpace(s)) {
8 case "critical":
9 return 4
10 case "error":
11 return 3
12 case "warning", "warn":
13 return 2
14 case "informational", "info", "":
15 return 1
16 default:
17 return 1
18 }
19}

Callers 1

emitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected