apply staticcheck
This commit is contained in:
parent
e224a452be
commit
ab395a42c8
5 changed files with 16 additions and 19 deletions
|
@ -67,7 +67,7 @@ func GetAppToken(client *FreeboxHttpClient, apiVersion *FreeboxAPIVersion) (stri
|
|||
case "granted":
|
||||
return postResponse.AppToken, nil
|
||||
default:
|
||||
return "", fmt.Errorf("Access is %s", status.Status)
|
||||
return "", fmt.Errorf("access is %s", status.Status)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ func (f *FreeboxSession) Refresh() error {
|
|||
f.sessionTokenLock.Lock()
|
||||
defer f.sessionTokenLock.Unlock()
|
||||
|
||||
if sinceLastUpdate := time.Now().Sub(f.sessionTokenLastUpdate); sinceLastUpdate < 5*time.Second {
|
||||
if sinceLastUpdate := time.Since(f.sessionTokenLastUpdate); sinceLastUpdate < 5*time.Second {
|
||||
log.Debug.Printf("Updated %v ago. Skipping", sinceLastUpdate)
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue