ntfy-alertmanager/functions.go

24 lines
292 B
Go
Raw Normal View History

2022-10-12 17:04:44 +02:00
package main
import "sort"
2022-10-12 17:04:44 +02:00
func sliceContains(s []string, e string) bool {
for _, v := range s {
if e == v {
return true
}
}
return false
}
func sortKeys(m map[string]string) []string {
var s []string
for key := range m {
s = append(s, key)
}
sort.Strings(s)
return s
}