mirror of
https://github.com/lus/pasty.git
synced 2023-08-10 21:13:09 +03:00
11 lines
152 B
Go
11 lines
152 B
Go
|
package slices
|
||
|
|
||
|
func Contains[T comparable](src []T, val T) bool {
|
||
|
for _, elem := range src {
|
||
|
if elem == val {
|
||
|
return true
|
||
|
}
|
||
|
}
|
||
|
return false
|
||
|
}
|