Re: [go-nuts] Whats wrong with my channel

2021-08-19 Thread Jan Mercl
On Thu, Aug 19, 2021 at 4:43 PM Денис Мухортов wrote: > I just started practicing with channels, after writing to the channel, > nothing is output from there > func main() { > d := make(chan int) > go factorial(5, d) > time.Sleep(3 * time.Second) > } > > func factorial(n int, d chan

[go-nuts] Whats wrong with my channel

2021-08-19 Thread Денис Мухортов
I just started practicing with channels, after writing to the channel, nothing is output from there func main() { d := make(chan int) go factorial(5, d) time.Sleep(3 * time.Second) } func factorial(n int, d chan int) { fmt.Println("function starting...") time.Sleep(3 * time.S