3 ms·
Most of the time you write `let x = await foo()` in js should become `x, err := foo() if err != nil then return nil, err end` in go, not anything to do with cha
by anonymoushn 9y ago
Most of the time you write `let x = await foo()` in js should become `x, err := foo() if err != nil then return nil, err end` in go, not anything to do with channels
- always_good 9y agoWhat about `const [a, b] = await Promise.all([thing2(), thing2()])`. Or const results = await Promise.map(xs, x => process(x), { concurrency: 2 }) Or having 2 concurrent loops processing some data? All things that require more boilerplate in Go while trivial in Node.