|
|
|
|
|
by Kamq
1066 days ago
|
|
I think more idiomatic go for the first case would be: getNext := iterableThing.Iterator()
for next, ok := getNext(); ok; next, ok = getNext() {
...
}
Which, yeah, the range cleans it up a bit, but it's not doing quite as much work as you're implying. |
|