Permalink
Browse files

net: context plumbing, add Dialer.DialContext

For #12580 (http.Transport tracing/analytics)
Updates #13021

Change-Id: I126e494a7bd872e42c388ecb58499ecbf0f014cc
Reviewed-on: https://go-review.googlesource.com/22101
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
  • Loading branch information...
bradfitz committed Apr 15, 2016
1 parent 1d0977a commit b6b4004d5a5bf7099ac9ab76777797236da7fe63
@@ -280,7 +280,9 @@ var pkgDeps = map[string][]string{
// Basic networking.
// Because net must be used by any package that wants to
// do networking portably, it must have a small dependency set: just L0+basic os.
"net": {"L0", "CGO", "math/rand", "os", "sort", "syscall", "time", "internal/syscall/windows", "internal/singleflight", "internal/race"},
"net": {"L0", "CGO",
"context", "math/rand", "os", "sort", "syscall", "time",
"internal/syscall/windows", "internal/singleflight", "internal/race"},
// NET enables use of basic network-related packages.
"NET": {
View
@@ -7,7 +7,10 @@
package net
import "testing"
import (
"context"
"testing"
)
func TestCgoLookupIP(t *testing.T) {
host := "localhost"
@@ -18,7 +21,7 @@ func TestCgoLookupIP(t *testing.T) {
if err != nil {
t.Error(err)
}
if _, err := goLookupIP(host); err != nil {
if _, err := goLookupIP(context.Background(), host); err != nil {
t.Error(err)
}
}
Oops, something went wrong.

0 comments on commit b6b4004

Please sign in to comment.