forked from TrueCloudLab/rclone
Fix linting errors
This commit is contained in:
parent
8f3f24672c
commit
9c451d9ac6
2 changed files with 6 additions and 5 deletions
|
@ -521,10 +521,10 @@ func (f *Fs) About(ctx context.Context) (usage *fs.Usage, err error) {
|
||||||
Path: "/user/info.cgi",
|
Path: "/user/info.cgi",
|
||||||
ContentType: "application/json",
|
ContentType: "application/json",
|
||||||
}
|
}
|
||||||
var account_info AccountInfo
|
var accountInfo AccountInfo
|
||||||
var resp *http.Response
|
var resp *http.Response
|
||||||
err = f.pacer.Call(func() (bool, error) {
|
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)
|
return shouldRetry(ctx, resp, err)
|
||||||
})
|
})
|
||||||
if err != nil {
|
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
|
// FIXME max upload size would be useful to use in Update
|
||||||
usage = &fs.Usage{
|
usage = &fs.Usage{
|
||||||
Used: fs.NewUsageValue(account_info.ColdStorage), // bytes in use
|
Used: fs.NewUsageValue(accountInfo.ColdStorage), // bytes in use
|
||||||
Total: fs.NewUsageValue(account_info.AvailableColdStorage), // bytes total
|
Total: fs.NewUsageValue(accountInfo.AvailableColdStorage), // bytes total
|
||||||
Free: fs.NewUsageValue(account_info.AvailableColdStorage - account_info.ColdStorage), // bytes free
|
Free: fs.NewUsageValue(accountInfo.AvailableColdStorage - accountInfo.ColdStorage), // bytes free
|
||||||
}
|
}
|
||||||
return usage, nil
|
return usage, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,6 +183,7 @@ type FoldersList struct {
|
||||||
SubFolders []Folder `json:"sub_folders"`
|
SubFolders []Folder `json:"sub_folders"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AccountInfo is the structure how 1Fichier returns user info
|
||||||
type AccountInfo struct {
|
type AccountInfo struct {
|
||||||
StatsDate string `json:"stats_date"`
|
StatsDate string `json:"stats_date"`
|
||||||
MailRM string `json:"mail_rm"`
|
MailRM string `json:"mail_rm"`
|
||||||
|
|
Loading…
Add table
Reference in a new issue