Daily bump.
[official-gcc.git] / libgo / go / net / hook.go
blobd7316ea4383f5c359ee4e05cf25158719dce8a17
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.
5 package net
7 import "context"
9 var (
10 // if non-nil, overrides dialTCP.
11 testHookDialTCP func(ctx context.Context, net string, laddr, raddr *TCPAddr) (*TCPConn, error)
13 testHookHostsPath = "/etc/hosts"
14 testHookLookupIP = func(
15 ctx context.Context,
16 fn func(context.Context, string) ([]IPAddr, error),
17 host string,
18 ) ([]IPAddr, error) {
19 return fn(ctx, host)
21 testHookSetKeepAlive = func() {}