diff options
author | Matthew Dempsky <mdempsky@google.com> | 2016-04-28 11:15:44 -0700 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2016-04-28 20:22:11 +0000 |
commit | 4d9bda51ff91f79944a12106b77315c9414b851a (patch) | |
tree | d8cdfcc79c7f7a11f1657965b105b9736ca387ae /src/net/dnsclient_unix_test.go | |
parent | 2cc27a7de9e7d14cb6702153688d02746c6a49ea (diff) | |
download | go-4d9bda51ff91f79944a12106b77315c9414b851a.tar.gz go-4d9bda51ff91f79944a12106b77315c9414b851a.zip |
net: append ":53" to DNS servers when reading resolv.conf
Avoids generating some redundant garbage from re-concatenating the
same string for every DNS query.
benchmark old allocs new allocs delta
BenchmarkGoLookupIP-32 156 154 -1.28%
BenchmarkGoLookupIPNoSuchHost-32 456 446 -2.19%
BenchmarkGoLookupIPWithBrokenNameServer-32 577 564 -2.25%
benchmark old bytes new bytes delta
BenchmarkGoLookupIP-32 10873 10824 -0.45%
BenchmarkGoLookupIPNoSuchHost-32 43303 43140 -0.38%
BenchmarkGoLookupIPWithBrokenNameServer-32 46824 46616 -0.44%
Update #15473.
Change-Id: I3b0173dfedf31bd08eaea1069968b416850864a1
Reviewed-on: https://go-review.googlesource.com/22556
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/net/dnsclient_unix_test.go')
-rw-r--r-- | src/net/dnsclient_unix_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/dnsclient_unix_test.go b/src/net/dnsclient_unix_test.go index b4aacef54f..c1ef5a32d3 100644 --- a/src/net/dnsclient_unix_test.go +++ b/src/net/dnsclient_unix_test.go @@ -221,7 +221,7 @@ var updateResolvConfTests = []struct { { name: "golang.org", lines: []string{"nameserver 8.8.8.8"}, - servers: []string{"8.8.8.8"}, + servers: []string{"8.8.8.8:53"}, }, { name: "", @@ -231,7 +231,7 @@ var updateResolvConfTests = []struct { { name: "www.example.com", lines: []string{"nameserver 8.8.4.4"}, - servers: []string{"8.8.4.4"}, + servers: []string{"8.8.4.4:53"}, }, } |