Documentation ¶
Overview ¶
The purpose of this test is to convert one type of channel to a channel of
open interface, interface{}. Since a chan int, or chan string, or chan inteface{} is it's own chan type, we can't directly do `openInterfaceChannel <- intChannel`, we need to iterate over each item received, and put that value on the new out channel. To figure out what kind of channel we have as input we use the reflect.ValueOf, and use that to set the type of the incomming channel, and then put that value of a new out channel which is of type interface{}.
Click to show internal directories.
Click to hide internal directories.