aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/utils/finalizer_utils.go
blob: 5f196c028fb5e1b6bba70b86d28456daf784998d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package utils

func Contains(slice []string, str string) bool {
	for _, item := range slice {
		if item == str {
			return true
		}
	}
	return false
}

func Remove(slice []string, str string) (result []string) {
	for _, item := range slice {
		if item == str {
			continue
		}
		result = append(result, item)
	}
	return result
}