mirror of https://github.com/golang/go.git
net: fix build
https://golang.org/cl/16953 broke the world. Change-Id: I7cbd4105338ff896bd0c8f69a0b126b6272be2e5 Reviewed-on: https://go-review.googlesource.com/17914 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
53a207131d
commit
8cdd7d14ac
|
|
@ -4,11 +4,8 @@
|
||||||
|
|
||||||
package net
|
package net
|
||||||
|
|
||||||
import "time"
|
|
||||||
|
|
||||||
var (
|
var (
|
||||||
testHookDialTCP = dialTCP
|
testHookDialTCP = dialTCP
|
||||||
testHookDNSDialer = func(d time.Duration) dnsDialer { return &Dialer{Timeout: d} }
|
|
||||||
testHookHostsPath = "/etc/hosts"
|
testHookHostsPath = "/etc/hosts"
|
||||||
testHookLookupIP = func(fn func(string) ([]IPAddr, error), host string) ([]IPAddr, error) { return fn(host) }
|
testHookLookupIP = func(fn func(string) ([]IPAddr, error), host string) ([]IPAddr, error) { return fn(host) }
|
||||||
testHookSetKeepAlive = func() {}
|
testHookSetKeepAlive = func() {}
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,14 @@
|
||||||
|
|
||||||
package net
|
package net
|
||||||
|
|
||||||
import "syscall"
|
import (
|
||||||
|
"syscall"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
testHookDialChannel = func() {} // see golang.org/issue/5349
|
testHookDialChannel = func() {} // see golang.org/issue/5349
|
||||||
|
testHookDNSDialer = func(d time.Duration) dnsDialer { return &Dialer{Timeout: d} }
|
||||||
|
|
||||||
// Placeholders for socket system calls.
|
// Placeholders for socket system calls.
|
||||||
socketFunc func(int, int, int) (int, error) = syscall.Socket
|
socketFunc func(int, int, int) (int, error) = syscall.Socket
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue