1
0
mirror of https://github.com/rclone/rclone.git synced 2025-07-06 06:27:53 +02:00

Fix lint issues reported by staticcheck

Used staticcheck 2022.1.2 (v0.3.2)

See: staticcheck.io
This commit is contained in:
albertony
2022-06-08 22:25:17 +02:00
parent 74bd7f3381
commit ec117593f1
66 changed files with 130 additions and 185 deletions

View File

@ -280,7 +280,7 @@ func (ts *TokenSource) timeToExpiry() time.Duration {
if t.Expiry.IsZero() {
return 3e9 * time.Second // ~95 years
}
return t.Expiry.Sub(time.Now())
return time.Until(t.Expiry)
}
// OnExpiry returns a channel which has the time written to it when
@ -766,7 +766,6 @@ func (s *authServer) Init() error {
}
fs.Debugf(nil, "Redirecting browser to: %s", s.authURL)
http.Redirect(w, req, s.authURL, http.StatusTemporaryRedirect)
return
})
mux.HandleFunc("/", s.handleAuth)