mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-29 06:28:17 +00:00
13 lines
253 B
Go
13 lines
253 B
Go
package utils
|
|
|
|
// SlicesContains reports whether v is present in s.
|
|
// https://pkg.go.dev/golang.org/x/exp/slices#Contains
|
|
func SlicesContains[E comparable](s []E, v E) bool {
|
|
for _, vs := range s {
|
|
if v == vs {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|