From 5006ede266074f223243ab3f6f6adf68d817ab7c Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Wed, 8 Jun 2022 23:02:01 +0200 Subject: [PATCH] mailru: use variable type int instead of time.Duration for keeping number of seconds Fixes problem reported by staticcheck lint tool (v0.3.2): Poorly chosen name for variable of type time.Duration (ST1011). --- backend/mailru/mailru.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/mailru/mailru.go b/backend/mailru/mailru.go index c1a51cf4a..033f1d16d 100644 --- a/backend/mailru/mailru.go +++ b/backend/mailru/mailru.go @@ -2277,7 +2277,7 @@ type serverPool struct { pool pendingServerMap mu sync.Mutex path string - expirySec time.Duration + expirySec int fs *Fs } @@ -2384,7 +2384,7 @@ func (p *serverPool) addServer(url string, now time.Time) { p.mu.Lock() defer p.mu.Unlock() - expiry := now.Add(p.expirySec * time.Second) + expiry := now.Add(time.Duration(p.expirySec) * time.Second) expiryStr := []byte("-") if p.fs.ci.LogLevel >= fs.LogLevelInfo {