]> Cypherpunks repositories - gostls13.git/commitdiff
net: fix build
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 17 Dec 2015 16:04:21 +0000 (08:04 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 17 Dec 2015 16:06:58 +0000 (16:06 +0000)
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>
src/net/hook.go
src/net/hook_unix.go

index 81e061f372b74a132fc89b2a1586828a6881928a..9ab34c0e36faf6d0451e9c4869c1eca7bb2411fe 100644 (file)
@@ -4,11 +4,8 @@
 
 package net
 
-import "time"
-
 var (
        testHookDialTCP      = dialTCP
-       testHookDNSDialer    = func(d time.Duration) dnsDialer { return &Dialer{Timeout: d} }
        testHookHostsPath    = "/etc/hosts"
        testHookLookupIP     = func(fn func(string) ([]IPAddr, error), host string) ([]IPAddr, error) { return fn(host) }
        testHookSetKeepAlive = func() {}
index 361ca5980c38b24abc526e8a346fa6c2c0114efa..15c6a18a8a89dc993aa49bf4d1d7f1a182df5ddb 100644 (file)
@@ -6,10 +6,14 @@
 
 package net
 
-import "syscall"
+import (
+       "syscall"
+       "time"
+)
 
 var (
        testHookDialChannel = func() {} // see golang.org/issue/5349
+       testHookDNSDialer   = func(d time.Duration) dnsDialer { return &Dialer{Timeout: d} }
 
        // Placeholders for socket system calls.
        socketFunc        func(int, int, int) (int, error)         = syscall.Socket