diff options
Diffstat (limited to 'libgo/go/net/hook.go')
-rw-r--r-- | libgo/go/net/hook.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libgo/go/net/hook.go b/libgo/go/net/hook.go index d7316ea4383..ea71803e22a 100644 --- a/libgo/go/net/hook.go +++ b/libgo/go/net/hook.go @@ -4,7 +4,10 @@ package net -import "context" +import ( + "context" + "time" +) var ( // if non-nil, overrides dialTCP. @@ -13,10 +16,11 @@ var ( testHookHostsPath = "/etc/hosts" testHookLookupIP = func( ctx context.Context, - fn func(context.Context, string) ([]IPAddr, error), + fn func(context.Context, string, string) ([]IPAddr, error), + network string, host string, ) ([]IPAddr, error) { - return fn(ctx, host) + return fn(ctx, network, host) } - testHookSetKeepAlive = func() {} + testHookSetKeepAlive = func(time.Duration) {} ) |