deoren / notes

Various notes for topics I'm learning
2 stars 0 forks source link

Golang | Channels #71

Open deoren opened 5 years ago

deoren commented 5 years ago

refs https://guzalexander.com/2013/12/06/golang-channels-tutorial.html

i := make(chan int)             // by default the capacity is 0
s := make(chan string, 3)       // non-zero capacity

r := make(<-chan bool)              // can only read from
w := make(chan<- []os.FileInfo)     // can only write to