contain.go 154 B

12345678910
  1. package otherutils
  2. func Contain[T int | int64](pool []T, item T) bool {
  3. for _, v := range pool {
  4. if v == item {
  5. return true
  6. }
  7. }
  8. return false
  9. }