Skip to content

crypto/tls: add Dialer with Dial, DialContext methods #18482

Closed
@akalin-keybase

Description

@akalin-keybase

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.Proposal-Accepted

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions