mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-09 14:43:24 +00:00
code clean for repository (#6768)
Signed-off-by: yanggang <gang.yang@daocloud.io>
This commit is contained in:
@@ -107,9 +107,9 @@ func NewBackupRepository(namespace string, key BackupRepositoryKey) *velerov1api
|
||||
}
|
||||
|
||||
func isBackupRepositoryNotFoundError(err error) bool {
|
||||
return (err == errBackupRepoNotFound)
|
||||
return err == errBackupRepoNotFound
|
||||
}
|
||||
|
||||
func isBackupRepositoryNotProvisionedError(err error) bool {
|
||||
return (err == errBackupRepoNotProvisioned)
|
||||
return err == errBackupRepoNotProvisioned
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ func GetS3Credentials(config map[string]string) (*credentials.Value, error) {
|
||||
opts := session.Options{}
|
||||
credentialsFile := config[CredentialsFileKey]
|
||||
if credentialsFile == "" {
|
||||
credentialsFile = os.Getenv("AWS_SHARED_CREDENTIALS_FILE")
|
||||
credentialsFile = os.Getenv(awsCredentialsFileEnvVar)
|
||||
}
|
||||
if credentialsFile != "" {
|
||||
opts.SharedConfigFiles = append(opts.SharedConfigFiles, credentialsFile)
|
||||
|
||||
@@ -42,5 +42,5 @@ func GetGCPCredentials(config map[string]string) string {
|
||||
if credentialsFile, ok := config[CredentialsFileKey]; ok {
|
||||
return credentialsFile
|
||||
}
|
||||
return os.Getenv("GOOGLE_APPLICATION_CREDENTIALS")
|
||||
return os.Getenv(gcpCredentialsFileEnvVar)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user