From 503fa62794ccca8e27cde99f3fbabf41adad5f3f Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Thu, 29 Feb 2024 10:54:32 +0100 Subject: Replace util.Contains with slices.Contains --- pkg/util/util.go | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'pkg/util/util.go') 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() { -- cgit v1.2.3-70-g09d2