Closed
Description
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:
dialer := tls.Dialer{
...
}
netConn, err := dialer.DialContext(ctx, "tcp", server)
if err != nil {
...
}
c := ldap.NewConn(netConn, true)
c.SetTimeout(readTimeout)
c.Start()
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?