how to allocate array of channels in go
Posted
by eran
on Stack Overflow
See other posts from Stack Overflow
or by eran
Published on 2010-05-23T18:56:38Z
Indexed on
2010/05/23
19:00 UTC
Read the original article
Hit count: 499
google-go
Sorry for the novice syntax question.
How do how create an array of channels in go?
var c0 chan int = make(chan int);
var c1 chan int = make(chan int);
var c2 chan int = make(chan int);
var c3 chan int = make(chan int);
var c4 chan int = make(chan int);
That is, replacing the above five lines in one array of channels of size 5?
Many thanks.
© Stack Overflow or respective owner