Merge pull request #114158 from Octopusjust/k8s-pr18

staging/src/k8s.io/legacy-cloud-providers/azure: remove unnecessary `fmt.Sprintf`
This commit is contained in:
Kubernetes Prow Robot 2022-12-10 06:05:04 -08:00 committed by GitHub
commit 84cb936e5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -511,7 +511,7 @@ func (c *BlobDiskController) createStorageAccount(storageAccountName string, sto
err := c.common.cloud.StorageAccountClient.Create(ctx, c.common.resourceGroup, storageAccountName, cp)
if err != nil {
return fmt.Errorf(fmt.Sprintf("Create Storage Account: %s, error: %v", storageAccountName, err))
return fmt.Errorf("Create Storage Account: %s, error: %v", storageAccountName, err)
}
newAccountState := &storageAccountState{

View File

@ -199,7 +199,7 @@ func (az *Cloud) EnsureStorageAccount(accountOptions *AccountOptions, genAccount
defer cancel()
rerr := az.StorageAccountClient.Create(ctx, resourceGroup, accountName, cp)
if rerr != nil {
return "", "", fmt.Errorf(fmt.Sprintf("Failed to create storage account %s, error: %v", accountName, rerr))
return "", "", fmt.Errorf("failed to create storage account %s, error: %v", accountName, rerr)
}
}
}