mirror of
https://github.com/tmrts/go-patterns.git
synced 2024-11-27 23:46:06 +03:00
concurrency/generator: remove undefined result
This commit is contained in:
parent
82fc76d6ab
commit
f7e32625ec
@ -11,7 +11,7 @@ func Count(start int, end int) 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 <- result
|
ch <- i
|
||||||
}
|
}
|
||||||
|
|
||||||
close(ch)
|
close(ch)
|
||||||
|
Loading…
Reference in New Issue
Block a user