Channels are blocking



examples/blocking-channels/blocking_channels.go
package main

import "fmt"

func main() {
    ch := make(chan string)
    ch <- "Hello"

    text := <-ch
    fmt.Println(text)
}

fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan send]:
main.main()
	/home/gabor/work/slides/golang/examples/blocking-channels/blocking_channels.go:7 +0x59
exit status 2