aboutsummaryrefslogtreecommitdiff
path: root/pkg/util/util.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2022-04-24 18:53:32 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2022-04-24 18:53:32 +0200
commit79d3c2bfd95c5cb0ac6e4a3f97156161d792c676 (patch)
treecbfd034a362666b8dab842d3afed18cf95124ede /pkg/util/util.go
parent7822c9d443458ae9d1d9d678e279bfc516da7a8f (diff)
downloadfeed2imap-go-79d3c2bfd95c5cb0ac6e4a3f97156161d792c676.tar.gz
feed2imap-go-79d3c2bfd95c5cb0ac6e4a3f97156161d792c676.tar.bz2
feed2imap-go-79d3c2bfd95c5cb0ac6e4a3f97156161d792c676.zip
Replace `interface{}` by `any`
Diffstat (limited to 'pkg/util/util.go')
-rw-r--r--pkg/util/util.go4
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