Closed
Description
In go 1.7, Dialer
now has DialContext, which takes a context.Context
and uses it for expiration.
However, DialWithDialer
just calls Dial
on its given Dialer
, and doesn't take a context.Context
.
To be backwards compatible, probably need to provide a separate function, say, DialContextWithDialer
, that is like DialWithDialer
except it takes a context.Context
and calls DialContext
, and have DialWithDialer
call DialContextWithDialer
with context.Background()
.
It looks like as a workaround, callers can write their own DialContextWithDialer
function and copy most of DialWithDialer
.