An empty interface var can hold any type, so you could have a chan interface{}
then use an interface type assertion when you read a value.
Matt
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving
I'm trying to define a Reference Counted Channel struct, like below:
type RefCountedChannel {
Channel chan Type
RefCount int
mux sync.Mutex
}
I have to define different struts to hold different channel types.
But I don't care the type of Channel, I just close is when RefCount become