redigo icon indicating copy to clipboard operation
redigo copied to clipboard

Pass context to TestOnBorrow

Open dcormier opened this issue 4 years ago • 4 comments

I like to add tracing to my code. This depends on being able to pass a context around. To that end, I wish TestOnBorrow was passed the context that's passed to GetContext. Perhaps this would require a new function so it's not a breaking change: TestOnBorrowContext, or something similar.

dcormier avatar Oct 07 '19 16:10 dcormier

Indeed this would require a new method.

stevenh avatar Oct 11 '19 22:10 stevenh

Uh, so, was a new method added? The PR was closed without merging, resulting in this issue being closed. And I don't have permissions to reopen the issue.

dcormier avatar Apr 10 '20 15:04 dcormier

Yes you can see the comments on the https://github.com/gomodule/redigo/pull/442

stevenh avatar Apr 10 '20 18:04 stevenh

@dcormier just flagging this was reopened in case you didn't see the notification.

Also mentioning that I'm thinking of a v2 which would help clean up the existing interfaces, so would be interested in peoples feedback on use cases like this we should consider when designing that.

stevenh avatar Jan 28 '24 15:01 stevenh