Pull request 2147: all: upd deps, go, scripts
Squashed commit of the following: commit 425f1bd28074d22890629d06f43257e0353ce3d5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Feb 8 20:15:58 2024 +0300 all: upd deps, go, scripts
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
"github.com/AdguardTeam/golibs/errors"
|
||||
"github.com/AdguardTeam/golibs/log"
|
||||
"github.com/AdguardTeam/golibs/mathutil"
|
||||
"github.com/bluele/gcache"
|
||||
)
|
||||
|
||||
@@ -88,8 +87,7 @@ func (r *Default) Process(ip netip.Addr) (host string, changed bool) {
|
||||
log.Debug("rdns: resolving %q: %s", ip, err)
|
||||
}
|
||||
|
||||
// TODO(s.chzhen): Use built-in function max in Go 1.21.
|
||||
ttl = mathutil.Max(ttl, r.cacheTTL)
|
||||
ttl = max(ttl, r.cacheTTL)
|
||||
|
||||
item := &cacheItem{
|
||||
expiry: time.Now().Add(ttl),
|
||||
|
||||
Reference in New Issue
Block a user