I am trying to merge 2 channels in an iteration so that I can retrieve both channels values for each step. I wrote the following lines
ch1, ch2 := make(chan int), make(chan int)
go Walk(t1, ch1)
go Walk(t2, ch2)
for ints := range merge(ch1, ch2) {
fmt.Println(ints)
}
but when I run it, I get "prog.go:31: undefined: merge". I would like to know where this merge function is located.