Merge pull request #6892 from reasonerjt/cp-6768-1.12

[Cherry-pick v1.12] code clean for repository (#6768)
This commit is contained in:
Wenkai Yin(尹文开)
2023-09-28 17:56:59 +08:00
committed by GitHub
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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
}
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
}