@@ -40,9 +40,9 @@ const (
4040)
4141
4242type CachedIPItem struct {
43- ip net.IP
44- expiration * time.Time
45- updating_until * time.Time
43+ ip net.IP
44+ expiration * time.Time
45+ updatingUntil * time.Time
4646}
4747
4848type CachedIPs struct {
@@ -106,7 +106,7 @@ func ParseIP(ipStr string) net.IP {
106106// If ttl < 0, never expire
107107// Otherwise, ttl is set to max(ttl, MinResolverIPTTL)
108108func (xTransport * XTransport ) saveCachedIP (host string , ip net.IP , ttl time.Duration ) {
109- item := & CachedIPItem {ip : ip , expiration : nil , updating_until : nil }
109+ item := & CachedIPItem {ip : ip , expiration : nil , updatingUntil : nil }
110110 if ttl >= 0 {
111111 if ttl < MinResolverIPTTL {
112112 ttl = MinResolverIPTTL
@@ -126,7 +126,7 @@ func (xTransport *XTransport) markUpdatingCachedIP(host string) {
126126 if ok {
127127 now := time .Now ()
128128 until := now .Add (xTransport .timeout )
129- item .updating_until = & until
129+ item .updatingUntil = & until
130130 xTransport .cachedIPs .cache [host ] = item
131131 }
132132 xTransport .cachedIPs .Unlock ()
@@ -144,7 +144,7 @@ func (xTransport *XTransport) loadCachedIP(host string) (ip net.IP, expired bool
144144 expiration := item .expiration
145145 if expiration != nil && time .Until (* expiration ) < 0 {
146146 expired = true
147- if item .updating_until != nil && time .Until (* item .updating_until ) > 0 {
147+ if item .updatingUntil != nil && time .Until (* item .updatingUntil ) > 0 {
148148 updating = true
149149 }
150150 }
0 commit comments