net: move testHookSetKeepAlive into hook.go

Change-Id: I1f2d4e3b0351a7a47c3a6073833a17dbc0c7b05c
Reviewed-on: https://go-review.googlesource.com/8520
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Mikio Hara 2015-04-07 11:37:29 +09:00
parent 35b3db253c
commit be4c38ed34
2 changed files with 4 additions and 3 deletions

View File

@ -180,8 +180,6 @@ func (d *Dialer) Dial(network, address string) (Conn, error) {
return c, err
}
var testHookSetKeepAlive = func() {} // changed by dial_test.go
// dialMulti attempts to establish connections to each destination of
// the list of addresses. It will return the first established
// connection and close the other connections. Otherwise it returns

View File

@ -4,4 +4,7 @@
package net
var testHookLookupIP = func(fn func(string) ([]IPAddr, error), host string) ([]IPAddr, error) { return fn(host) }
var (
testHookLookupIP = func(fn func(string) ([]IPAddr, error), host string) ([]IPAddr, error) { return fn(host) }
testHookSetKeepAlive = func() {}
)