streadway/amqp — pull request #33 by peterbourgon (2012-07-20 17:57:41+00:00)
Title: Rework examples: use Channel.Cancel + range on deliveries

With the addition of amqp.Channel.Cancel(), we can simplify delivery-chan read code to a simple 'range'. The Cancel, called out-of-band from the main goroutine, will close() all registered consumers.

Cancel requires a consumer-tag, and a blank tag causes one to be generated. Since there's no way to introspect for that generated tag (as far as I could see) it's important to provide a non-empty -consumer-tag to Consume.

I had to do some silly rebasing due to a poorly-considered 'pull' from upstream. Please forgive the noise. The important commits are the ones with my name on them.