On Wed, Jun 17, 2020 at 9:35 AM <hunterlher...@gmail.com> wrote:
>
> How do I write a function that can take any container? Either a built in 
> container or a user defined structure? Java is awkward when deciding to 
> accept arrays or the List type — is go fated to repeat this awkwardness?

It is as you fear: Go does not have a unified syntax for looping over
either builtin containers or user containers.  In Go this rarely comes
up due to the absence of generics.

Ian

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcV1bz2tWZyR59AY2QgH45ZsXBVe5CrHQz122k_bXuWztg%40mail.gmail.com.

Reply via email to