1
mirror of https://github.com/rclone/rclone synced 2024-11-25 02:47:14 +01:00

Fix linting errors

This commit is contained in:
albertony 2022-01-26 00:02:17 +01:00
parent 8f3f24672c
commit 9c451d9ac6
2 changed files with 6 additions and 5 deletions

View File

@ -521,10 +521,10 @@ func (f *Fs) About(ctx context.Context) (usage *fs.Usage, err error) {
Path: "/user/info.cgi",
ContentType: "application/json",
}
var account_info AccountInfo
var accountInfo AccountInfo
var resp *http.Response
err = f.pacer.Call(func() (bool, error) {
resp, err = f.rest.CallJSON(ctx, &opts, nil, &account_info)
resp, err = f.rest.CallJSON(ctx, &opts, nil, &accountInfo)
return shouldRetry(ctx, resp, err)
})
if err != nil {
@ -533,9 +533,9 @@ func (f *Fs) About(ctx context.Context) (usage *fs.Usage, err error) {
// FIXME max upload size would be useful to use in Update
usage = &fs.Usage{
Used: fs.NewUsageValue(account_info.ColdStorage), // bytes in use
Total: fs.NewUsageValue(account_info.AvailableColdStorage), // bytes total
Free: fs.NewUsageValue(account_info.AvailableColdStorage - account_info.ColdStorage), // bytes free
Used: fs.NewUsageValue(accountInfo.ColdStorage), // bytes in use
Total: fs.NewUsageValue(accountInfo.AvailableColdStorage), // bytes total
Free: fs.NewUsageValue(accountInfo.AvailableColdStorage - accountInfo.ColdStorage), // bytes free
}
return usage, nil
}

View File

@ -183,6 +183,7 @@ type FoldersList struct {
SubFolders []Folder `json:"sub_folders"`
}
// AccountInfo is the structure how 1Fichier returns user info
type AccountInfo struct {
StatsDate string `json:"stats_date"`
MailRM string `json:"mail_rm"`