Re:Go Hercule
by jnks on Friday June 27, 2014 @05:28PM
(#7956371)
The idea is it's `for k := range object` to iterate over the keys, and `for k, v := range object` to iterate over the keys and values, whether the object is a slice, array, map or string. The only exceptional case is a channel, which has no indices/keys.
[ Parent
| on HN ]