Original post


I am trying to terminate all running goroutines if one fails. It is normally easy but I couldn’t make it work for goroutines that contain child goroutines. What I need from this example is that, when the iteration comes to ID:4 COUNTER:2 step, everything should fail. However, all continue until the end. I injected errgroup from the main to run but it didn’t change anything. Also moved groups inside loops but it didn’t work either.