mirror of
https://github.com/tmrts/go-patterns.git
synced 2026-11-11 23:07:51 +03:00
1 parent
0ca6f6652d
commit
399a51c7fe
1 file changed
+1
-1
@@ -9,7 +9,7 @@ func Count(start int, end int) chan int {
|
|||||||
ch := make(chan int)
|
ch := make(chan int)
|
||||||
|
|
||||||
go func(ch chan int) {
|
go func(ch chan int) {
|
||||||
for i := start; i < end ; i++ {
|
for i := start; i <= end ; i++ {
|
||||||
// Blocks on the operation
|
// Blocks on the operation
|
||||||
ch <- i
|
ch <- i
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user