From: Rui Ueyama Date: Thu, 12 Jun 2014 03:33:44 +0000 (-0700) Subject: net: do not call time.Now() twice X-Git-Tag: go1.4beta1~1310 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f837078c505aae1f2fae3d35c525d4666d582989;p=gostls13.git net: do not call time.Now() twice LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/104080043 --- diff --git a/src/pkg/net/hosts.go b/src/pkg/net/hosts.go index e6674ba341..9400503e41 100644 --- a/src/pkg/net/hosts.go +++ b/src/pkg/net/hosts.go @@ -51,7 +51,7 @@ func readHosts() { } } // Update the data cache. - hosts.expire = time.Now().Add(cacheMaxAge) + hosts.expire = now.Add(cacheMaxAge) hosts.path = hp hosts.byName = hs hosts.byAddr = is