MCPcopy
hub / github.com/davecheney/httpstat / dialContext

Function dialContext

main.go:206–214  ·  view source on GitHub ↗
(network string)

Source from the content-addressed store, hash-verified

204}
205
206func dialContext(network string) func(ctx context.Context, network, addr string) (net.Conn, error) {
207 return func(ctx context.Context, _, addr string) (net.Conn, error) {
208 return (&net.Dialer{
209 Timeout: 30 * time.Second,
210 KeepAlive: 30 * time.Second,
211 DualStack: false,
212 }).DialContext(ctx, network, addr)
213 }
214}
215
216// visit visits a url and times the interaction.
217// If the response is a 30x, visit follows the redirect.

Callers 1

visitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected