#Channel from go routine never closing
5 messages · Page 1 of 1 (latest)
Most probably your program is deadlocked
Because you're writing to and reading from the same channel on the same goroutine, one of those operations is blocking which means the other operation never starts, and therefore your program is deadlocked.
I recommend reviewing the channels section in Tour of Go: https://go.dev/tour/concurrency/2
Ok so in main.go i needed first the err, i was waiting first for the error, but if in the goroutine wasnt an error my code would still wait for err to be declared so it never concludes