You shouldn't need the goroutine if you give retainChan a buffer of 1.