|
|
|
|
|
by hombre_fatal
703 days ago
|
|
Of course, the other nice thing about the JS example compared to Go is that it's trivial at the callsite to do this: const [[rA, errA], [rB, errB]] = await Promise.all([
engine.doSomethingWithA(),
engine.doSomethingWithB()
])
At least these days you can ask an LLM to write the WaitGroup boilerplate for you in Go. |
|
Not to mention waitgroups are way overkill for this. You’d just use a channel or two. Or an errgroup if you want to be fancy.