From 9c451d9ac63385abb1951d1e3ac67d2f04518277 Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Wed, 26 Jan 2022 00:02:17 +0100 Subject: [PATCH] Fix linting errors --- backend/fichier/fichier.go | 10 +++++----- backend/fichier/structs.go | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/backend/fichier/fichier.go b/backend/fichier/fichier.go index 1af73bdc2..8548d00c2 100644 --- a/backend/fichier/fichier.go +++ b/backend/fichier/fichier.go @@ -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 } diff --git a/backend/fichier/structs.go b/backend/fichier/structs.go index 7868066e8..89673f7f3 100644 --- a/backend/fichier/structs.go +++ b/backend/fichier/structs.go @@ -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"`