diff --git a/utils/std.go b/utils/std.go new file mode 100644 index 0000000..75b35f1 --- /dev/null +++ b/utils/std.go @@ -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 +}