Re:Coroutines for Go
by rcme on Monday July 17, 2023 @05:06PM
(#36764081)
Depends how getNext is defined.
[ Parent
| on HN ]
The only way to do control flow in getNext, consistent with how you partially defined it, is to panic. That means there is some important code wrapping the whole loop body that you left out.