4 ms·
Check the first comment in the article - I can't believe that is actually good and idiomatic. The author uses the indexes, but the range command also supports
by alec 15y ago
Check the first comment in the article - I can't believe that is actually good and idiomatic. The author uses the indexes, but the range command also supports returning the values.
To be fair, I have a lot of difficulty figuring out what's a reference and what's a value in Go; I suspect if it were an int and not a struct, that wouldn't work.
- dhconnelly 15y agoOnly slices, maps, and channels are reference types.