4 ms·
> However, this time around I wanted asynchronous requests but to be able to report on completed work in order. This seems similar to JavaScript's for await...
by heavyairship 2y ago
> However, this time around I wanted asynchronous requests but to be able to report on completed work in order.
This seems similar to JavaScript's for await...of construct https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe....
A while ago I added a golang version here https://github.com/heavyairship/gopherawaitof https://github.com/heavyairship/gopherawaitof.
- grahamj 2y agoYeah this is a one-liner in JS for await of (const name in ips.map(getName)) console.log(name) Although you’d want more frills to deal with rejections