forked from TrueCloudLab/rclone
build: fix problems found with golint
This commit is contained in:
parent
6b3a9bf26a
commit
8d5d332daf
2 changed files with 7 additions and 9 deletions
12
backend/cache/cache_internal_test.go
vendored
12
backend/cache/cache_internal_test.go
vendored
|
@ -1632,15 +1632,13 @@ func (r *run) getCacheFs(f fs.Fs) (*cache.Fs, error) {
|
||||||
cfs, ok := f.(*cache.Fs)
|
cfs, ok := f.(*cache.Fs)
|
||||||
if ok {
|
if ok {
|
||||||
return cfs, nil
|
return cfs, nil
|
||||||
} else {
|
}
|
||||||
if f.Features().UnWrap != nil {
|
if f.Features().UnWrap != nil {
|
||||||
cfs, ok := f.Features().UnWrap().(*cache.Fs)
|
cfs, ok := f.Features().UnWrap().(*cache.Fs)
|
||||||
if ok {
|
if ok {
|
||||||
return cfs, nil
|
return cfs, nil
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil, errors.New("didn't found a cache fs")
|
return nil, errors.New("didn't found a cache fs")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -195,7 +195,7 @@ type Options struct {
|
||||||
StorageURL string `config:"storage_url"`
|
StorageURL string `config:"storage_url"`
|
||||||
AuthToken string `config:"auth_token"`
|
AuthToken string `config:"auth_token"`
|
||||||
AuthVersion int `config:"auth_version"`
|
AuthVersion int `config:"auth_version"`
|
||||||
ApplicationCredentialId string `config:"application_credential_id"`
|
ApplicationCredentialID string `config:"application_credential_id"`
|
||||||
ApplicationCredentialName string `config:"application_credential_name"`
|
ApplicationCredentialName string `config:"application_credential_name"`
|
||||||
ApplicationCredentialSecret string `config:"application_credential_secret"`
|
ApplicationCredentialSecret string `config:"application_credential_secret"`
|
||||||
StoragePolicy string `config:"storage_policy"`
|
StoragePolicy string `config:"storage_policy"`
|
||||||
|
@ -317,7 +317,7 @@ func swiftConnection(opt *Options, name string) (*swift.Connection, error) {
|
||||||
StorageUrl: opt.StorageURL,
|
StorageUrl: opt.StorageURL,
|
||||||
AuthToken: opt.AuthToken,
|
AuthToken: opt.AuthToken,
|
||||||
AuthVersion: opt.AuthVersion,
|
AuthVersion: opt.AuthVersion,
|
||||||
ApplicationCredentialId: opt.ApplicationCredentialId,
|
ApplicationCredentialId: opt.ApplicationCredentialID,
|
||||||
ApplicationCredentialName: opt.ApplicationCredentialName,
|
ApplicationCredentialName: opt.ApplicationCredentialName,
|
||||||
ApplicationCredentialSecret: opt.ApplicationCredentialSecret,
|
ApplicationCredentialSecret: opt.ApplicationCredentialSecret,
|
||||||
EndpointType: swift.EndpointType(opt.EndpointType),
|
EndpointType: swift.EndpointType(opt.EndpointType),
|
||||||
|
|
Loading…
Add table
Reference in a new issue