1
0
mirror of https://github.com/lus/pasty.git synced 2023-08-10 21:13:09 +03:00
pasty/internal/slices/slice_utils.go
2023-06-07 19:51:54 +02:00

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
}