()
| 134 | } |
| 135 | |
| 136 | func ExampleSchedule() { |
| 137 | count := 0 |
| 138 | |
| 139 | increase := func() { |
| 140 | count++ |
| 141 | } |
| 142 | |
| 143 | stop := Schedule(2*time.Second, increase) |
| 144 | |
| 145 | time.Sleep(2 * time.Second) |
| 146 | close(stop) |
| 147 | |
| 148 | fmt.Println(count) |
| 149 | |
| 150 | // Output: |
| 151 | // 2 |
| 152 | } |
| 153 | |
| 154 | func ExamplePipeline() { |
| 155 | addOne := func(x int) int { |
nothing calls this directly
no test coverage detected
searching dependent graphs…