1
mirror of https://github.com/rclone/rclone synced 2024-11-21 22:50:16 +01:00

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
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 {