mirror of
https://github.com/tmrts/go-patterns.git
synced 2024-11-22 04:56:09 +03:00
Fix formatting of generator.md
This commit is contained in:
parent
f978e42036
commit
f9557e066b
@ -6,13 +6,13 @@
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
func Count(start int, end int) chan int {
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
close(ch)
|
close(ch)
|
||||||
}(ch)
|
}(ch)
|
||||||
|
Loading…
Reference in New Issue
Block a user