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).
This commit is contained in:
albertony 2022-06-08 23:02:01 +02:00 committed by Nick Craig-Wood
parent 0f41e91d41
commit 5006ede266

View file

@ -2277,7 +2277,7 @@ type serverPool struct {
pool pendingServerMap pool pendingServerMap
mu sync.Mutex mu sync.Mutex
path string path string
expirySec time.Duration expirySec int
fs *Fs fs *Fs
} }
@ -2384,7 +2384,7 @@ func (p *serverPool) addServer(url string, now time.Time) {
p.mu.Lock() p.mu.Lock()
defer p.mu.Unlock() defer p.mu.Unlock()
expiry := now.Add(p.expirySec * time.Second) expiry := now.Add(time.Duration(p.expirySec) * time.Second)
expiryStr := []byte("-") expiryStr := []byte("-")
if p.fs.ci.LogLevel >= fs.LogLevelInfo { if p.fs.ci.LogLevel >= fs.LogLevelInfo {