1 // Copyright 2015 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
13 // if non-nil, overrides dialTCP.
14 testHookDialTCP func(ctx context.Context, net string, laddr, raddr *TCPAddr) (*TCPConn, error)
16 testHookHostsPath = "/etc/hosts"
17 testHookLookupIP = func(
19 fn func(context.Context, string, string) ([]IPAddr, error),
23 return fn(ctx, network, host)
25 testHookSetKeepAlive = func(time.Duration) {}