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.
In go 1.7,
Dialernow has DialContext, which takes acontext.Contextand uses it for expiration.However,
DialWithDialerjust callsDialon its givenDialer, and doesn't take acontext.Context.To be backwards compatible, probably need to provide a separate function, say,
DialContextWithDialer, that is likeDialWithDialerexcept it takes acontext.Contextand callsDialContext, and haveDialWithDialercallDialContextWithDialerwithcontext.Background().It looks like as a workaround, callers can write their own
DialContextWithDialerfunction and copy most ofDialWithDialer.