Posted on 26th July 2024|29 views
Is there any equivalent to slice.contains(object) method in Go?
Posted on 26th July 2024| views
No, such a method does not endure, however, is useless to write:
func contains(r []int, p int) bool {
for _, x := range r {
if x == p {
return true
} } return false }