diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2022-04-24 18:53:32 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2022-04-24 18:53:32 +0200 |
commit | 79d3c2bfd95c5cb0ac6e4a3f97156161d792c676 (patch) | |
tree | cbfd034a362666b8dab842d3afed18cf95124ede /pkg/util/util.go | |
parent | 7822c9d443458ae9d1d9d678e279bfc516da7a8f (diff) | |
download | feed2imap-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.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 |