diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2024-02-29 10:54:32 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2024-02-29 10:54:32 +0100 |
commit | 503fa62794ccca8e27cde99f3fbabf41adad5f3f (patch) | |
tree | b5f33d4df92521ffc257668ecf31cbcb5ad35a22 /pkg/util/util.go | |
parent | 0833f21bb79425d090fe9830bc6ea6fc9a065f4b (diff) | |
download | feed2imap-go-503fa62794ccca8e27cde99f3fbabf41adad5f3f.tar.gz feed2imap-go-503fa62794ccca8e27cde99f3fbabf41adad5f3f.tar.bz2 feed2imap-go-503fa62794ccca8e27cde99f3fbabf41adad5f3f.zip |
Replace util.Contains with slices.Contains
Diffstat (limited to 'pkg/util/util.go')
-rw-r--r-- | pkg/util/util.go | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/pkg/util/util.go b/pkg/util/util.go index cbc6014..c0b5a17 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -2,17 +2,6 @@ package util import "time" -// 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 - } - } - - return false -} - // TimeFormat formats the given time, where an empty time is formatted as "not set". func TimeFormat(t time.Time) string { if t.IsZero() { |