mailcow-admin-aliases/internal/misc/misc.go

21 lines
337 B
Go

package misc
func StringIsInStringSlice(slice []string, s string) bool {
for _, item := range slice {
if item == s {
return true
}
}
return false
}
func RemoveStringFromStringSlice(slice []string, s string) []string {
a := []string{}
for _, item := range slice {
if item != s {
a = append(a, item)
}
}
return a
}