diff options
Diffstat (limited to 'pkg/util')
-rw-r--r-- | pkg/util/util.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/util/util.go b/pkg/util/util.go index bacb494..cbc6014 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -2,8 +2,8 @@ package util import "time" -// StrContains searches for `needle` in `haystack` and returns `true` if found. -func StrContains(haystack []string, needle string) bool { +// Contains searches for `needle` in `haystack` and returns `true` if found. +func Contains[T comparable](haystack []T, needle T) bool { for _, s := range haystack { if s == needle { return true |