Closed XiaoYiXiaoYang closed 3 weeks ago
Please see #665
type ProxyDialer struct {
dialer proxy.Dialer
}
func (d ProxyDialer) DialContext(ctx context.Context, network string, addr string) (net.Conn, error) {
return d.dialer.Dial(network, addr)
}
thanks~~, it works for me good.
Is your feature request related to a problem? Please describe. when i use "github.com/lib/pq" as sql driver to connect to postgressql i can use
func DialOpen(d Dialer, dsn string) (_ driver.Conn, err error)
method to connect to db with my custom dialerand i suggest "github.com/denisenkom/go-mssqldb" need a same one
Describe the solution you'd like add a method like
func DialOpen(d Dialer, dsn string) (_ driver.Conn, err error)
before create connectionDescribe alternatives you've considered
Additional context "github.com/go-sql-driver/mysql" have a similar method to use my own custom dialer, it is
func RegisterDial(network string, dial DialFunc)