I am working on a sample program to print sum of odd and sum of even number between 1 to 100 using goroutine with multiple channels.
you can find my code
sum of even number = 2550 sum of odd number = 2500 fatal error: all goroutines are asleep - deadlock! goroutine 1 [chan receive]: main.print(0x434100, 0x11db7c) /tmp/sandbox052575152/main.go:18 +0xc0 main.main() /tmp/sandbox052575152/main.go:14 +0x120
The code works but with deadlock. I am not sure what is wrong in my code