move stringInSlice to separate as ElementInSlice

This commit is contained in:
LordBex 2022-09-05 21:30:41 +02:00
parent 8111f14da3
commit 136d970fec

10
utils/std.go Normal file
View file

@ -0,0 +1,10 @@
package utils
func ElementInSlice[T comparable](check T, toCheck []T) bool {
for _, item := range toCheck {
if check == item {
return true
}
}
return false
}