Getting the following error while running the below code.
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan receive]:
Note: I am getting this error while reading from the channel on the main goroutine. If I read using a separate go routine, then it works fine. I am curious to know why this is not wokring on main thread.