// buildDialTLSContext returns an implementation of DialTLSContext callback in http.Transport.
// nolint:unused
buildDialTLSContext returns an implementation of DialTLSContext callback in http.Transport.
nolint:unused
// buildDialTLSContext returns an implementation of DialTLSContext callback in http . Transport . // nolint : unused
func (c *Client) buildDialTLSContext(tlsCtx *TLSOptionCtx) func(ctx context.Context, network, addr string) (net.Conn, error) {
	return func(ctx context.Context, network, addr string) (net.Conn, error) {
		d := getDefaultDialer()
		if t, ok := ctx.Deadline(); ok {
			d.Deadline = t
		}
		return tls.DialWithDialer(d, network, addr, tlsCtx.mutableConfig.TLSConfig())
	}
}
func ( c * Client ) buildDialTLSContext ( tlsCtx * TLSOptionCtx ) func ( ctx context . Context , network , addr string ) ( net . Conn , error ) { return func ( ctx context . Context , network , addr string ) ( net . Conn , error ) { d := getDefaultDialer ( ) if t , ok := ctx . Deadline ( ) ; ok { d . Deadline = t } return tls . DialWithDialer ( d , network , addr , tlsCtx . mutableConfig . TLSConfig ( ) ) } }
buildDialTLSContext returns an implementation of DialTLSContext callback in http.Transport.
buildDialTLSContext returns an implementation of DialTLSContext callback in http . Transport .
// TLS dialers do not support context, but we can use the context // deadline if it is set.