1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-03-18 21:57:50 +02:00

[#2527] removed unnecessary slice check

This commit is contained in:
Kunal Singh 2023-05-22 10:18:22 +05:30 committed by GitHub
parent 4f5aa6ffda
commit c370d84074
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,9 +27,6 @@ func SubtractSlice[T comparable](base []T, subtract []T) []T {
// ExistInSlice checks whether a comparable element exists in a slice of the same type.
func ExistInSlice[T comparable](item T, list []T) bool {
if len(list) == 0 {
return false
}
for _, v := range list {
if v == item {