Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

build: fix problems found with golint

Nick Craig-Wood8d5d332dafc4
diff --git a/backend/cache/cache_internal_test.go b/backend/cache/cache_internal_test.go
index 3f0a69f63..266d89df1 100644
--- a/backend/cache/cache_internal_test.go
+++ b/backend/cache/cache_internal_test.go
@@ -1632,15 +1632,13 @@ func (r *run) getCacheFs(f fs.Fs) (*cache.Fs, error) {
cfs, ok := f.(*cache.Fs)
if ok {
return cfs, nil
- } else {
- if f.Features().UnWrap != nil {
- cfs, ok := f.Features().UnWrap().(*cache.Fs)
- if ok {
- return cfs, nil
- }
+ }
+ if f.Features().UnWrap != nil {
+ cfs, ok := f.Features().UnWrap().(*cache.Fs)
+ if ok {
+ return cfs, nil
}
}
-
return nil, errors.New("didn't found a cache fs")
}
diff --git a/backend/swift/swift.go b/backend/swift/swift.go
index 54267c1cd..f56cb690d 100644
--- a/backend/swift/swift.go
+++ b/backend/swift/swift.go
@@ -195,7 +195,7 @@ type Options struct {
StorageURL string `config:"storage_url"`
AuthToken string `config:"auth_token"`
AuthVersion int `config:"auth_version"`
- ApplicationCredentialId string `config:"application_credential_id"`
+ ApplicationCredentialID string `config:"application_credential_id"`
ApplicationCredentialName string `config:"application_credential_name"`
ApplicationCredentialSecret string `config:"application_credential_secret"`
StoragePolicy string `config:"storage_policy"`
@@ -317,7 +317,7 @@ func swiftConnection(opt *Options, name string) (*swift.Connection, error) {
StorageUrl: opt.StorageURL,
AuthToken: opt.AuthToken,
AuthVersion: opt.AuthVersion,
- ApplicationCredentialId: opt.ApplicationCredentialId,
+ ApplicationCredentialId: opt.ApplicationCredentialID,
ApplicationCredentialName: opt.ApplicationCredentialName,
ApplicationCredentialSecret: opt.ApplicationCredentialSecret,
EndpointType: swift.EndpointType(opt.EndpointType),