streadway / amqp

Go client for AMQP 0.9.1
http://godoc.org/github.com/streadway/amqp
BSD 2-Clause "Simplified" License
4.88k stars 621 forks source link

Adding interfaces #383

Open krzysztof-gzocha opened 5 years ago

krzysztof-gzocha commented 5 years ago

Hi.

I'm using this library quite a lot recently and always have to write my own interfaces or wrappers for connection and channel, because I couldn't find any interfaces for them inside this library.

How about adding the smallest possible interfaces for basic structures like amqp.Connection or amqp.Channel? It would allow developers to write unit tests for the functions that uses them.

I'm willing to help in this manner, but would like to get your approval for this feature first, @streadway.

Kind regards

michaelklishin commented 5 years ago

Please submit a PR that would demonstrate the idea.

krzysztof-gzocha commented 5 years ago

@michaelklishin Sorry for the delay, but I've submitted draft PR to demonstrate the idea in #387 so please, have a look and let me know what you think.

Thank you.