I found this line:
return (<-chan Delivery)(deliveries), nil
https://github.com/streadway/amqp/blob/master/channel.go#L1089
What does it do? Why the double parentheses?
It's a type conversion. In your case, it converts chan Delivery
(two-way channel of Delivery
values) to <-chan Delivery
(receive-only channel of Delivery
values).
It is a type conversion. Returns deliveries
as a read-only channel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With