Sorry if this question reveals my newness to Go. I tried searching the
mailing list but I couldn't find anything in a quick search. It seems like
many languages include the ability to check if an array, or slice contain a
particular value. I understand that you could do this easily with a for
loop or alternatively use a map instead. However, is there a reason why Go
doesn't just have slice.Contains(interface{}) or maybe a builtin
contains(mySlice, interface{}) ?
I assume one reason might be because slices could potentially be really
large? Or maybe the community feels that a simple for loop is so easy that
it is not necessary? I would love to understand this more.
Thank You!
-Todd
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/7d4c52e3-8c0f-4ba6-ae24-67ddb4a07ede%40googlegroups.com.