Post
GoLang
Posted on 19th April 2024|25 views
Is there any equivalent to slice.contains(object) method in Go?
Posted on 19th April 2024
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 }
STILL GOT QUERIES?