by reltuk · 5y ago · 0 comments
https://github.com/golang/go/blob/master/src/context/context...
So in this case, errgroup probably doesn't have a choice and needs to call cancel() at some point.
btw, I realized I'm not being entirely fair in saying it caused a bug. There would have been one anyway. If conflictsBuilder.Wait() failed, it wouldn't cancel the other two operations. It'd wait them out even though the overall operation was doomed. Maybe not a very noticeable bug under normal conditions but still not right.