mirror of
https://github.com/rjNemo/underscore
synced 2026-06-06 10:36:43 +00:00
11 lines
222 B
Go
11 lines
222 B
Go
package underscore
|
|
|
|
// Contains returns true if the value is present in the slice
|
|
func Contains[T comparable](values []T, value T) bool {
|
|
for _, v := range values {
|
|
if v == value {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|