()
| 9 | ) |
| 10 | |
| 11 | func ExampleMapper() { |
| 12 | input := []int{1, 2, 3, 4} |
| 13 | mapper := Mapper[int, bool]{ |
| 14 | MaxGoroutines: len(input) / 2, |
| 15 | } |
| 16 | |
| 17 | results := mapper.Map(input, func(v *int) bool { return *v%2 == 0 }) |
| 18 | fmt.Println(results) |
| 19 | // Output: |
| 20 | // [false true false true] |
| 21 | } |
| 22 | |
| 23 | func TestMap(t *testing.T) { |
| 24 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…