-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
redisConnection unexported ?? #40
Comments
Yes. You should never have to refer to it by specific type. Instead you should pass it around as Or is there any case in which you'd actually need to refer to the specific type? |
The case is pretty much typical. How can I normally share the same connection across different functions? |
As I said, just pass it as func main() {
yourConnection := rmq.OpenConnection("your-tag", "tcp", "localhost:3456", 1)
yourQueue := YourFunction(yourConnection)
}
func YourFunction(queueConnection rmq.Connection) rmq.Queue {
return queueConnection.OpenQueue("your-queue")
} |
Yeah, I looked it over, that's what I need, thank you! |
Alright, I'll close this then 👍 |
Was it done on purpose ? :)
The text was updated successfully, but these errors were encountered: