My code as follows:
package main
import (
"fmt"
)
func main() {
c1 := make(chan int)
fmt.Println("push c1: ")
c1 <- 10
g1 := <- c1
fmt.Println("get g1: ", g1)
}
when I debug with delve, it prints this result:
push c1:
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan send]:
main.main()
D:/Go/projects/hello-world/src/ch9/code9_6/code1.go:10 +0xde
Process 6276 has exited with status 2
I don't know why, it's just one simple channel example, I make one channel, send value to it and get value from it, just this, someone can tell me why, and how to correct it, Thx a lot.

