mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 13:37:30 +00:00
14 lines
347 B
Go
14 lines
347 B
Go
package util
|
|
|
|
import "strings"
|
|
|
|
// StatusMatches compares status to any of the provided names (case-insensitive, trimmed).
|
|
func StatusMatches(status string, names ...string) bool {
|
|
ls := strings.ToLower(strings.TrimSpace(status))
|
|
for _, n := range names {
|
|
if ls == strings.ToLower(strings.TrimSpace(n)) {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|