-
Notifications
You must be signed in to change notification settings - Fork 365
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
Connection.Start is deprecated without alternative #507
Comments
Lines 130 to 135 in 2260012
You can use the connection option in Lines 225 to 229 in 2260012
|
There is no DialOpt to provide a context.Context to be used together with a net.Dialer's DialContext function. go-ldap currently uses Dial functions and never DialContext. So there is still no way to implement the same functionality as in my code snippet using non-deprecated APIs. |
Agreed. Context implementation is still open and mostly unfinished (see #406). I'll consider revertig the deprecation, as we didn't thought of this use case. Sorry for any inconveniences. The function should work just fine in the meantime. |
Hi, |
I just released a new version with the reverted commit: https://github.com/go-ldap/ldap/releases/tag/v3.4.8 Again, thank you for pointing this out, I'm sorry for any inconveniences. |
As discussed in #356 and implemented in #499 the Connection.Start function has been deprecated, but there is now no way to use net.DialContext instead of one of the ldap.Dial-functions. We currently initialize connections this way:
How can the same (using DialContext and setting a timeout) be achieved through non-deprecated APIs of the ldap package?
Should ldap.NewConn not have been deprecated alongside Connection.Start or is there any legitimate way left to use it?
The text was updated successfully, but these errors were encountered: