staging/src/k8s.io/legacy-cloud-providers/azure: remove unnecessary fmt.Sprintf

This commit is contained in:
ZhangYu
2022-11-28 16:56:01 +08:00
parent 7061704297
commit 357d0a8603
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)
}
}
}