refactor: refactoring of code to meet all go lint requirements

This commit is contained in:
Jonas Kaninda
2024-12-06 16:25:16 +01:00
parent 2bcfd3aacf
commit 793b04340e
10 changed files with 141 additions and 17 deletions

View File

@@ -55,12 +55,12 @@ func createClient(conf Config) (*azblob.Client, error) {
// Create the service URL
credential, err := azblob.NewSharedKeyCredential(conf.AccountName, conf.AccountKey)
if err != nil {
log.Fatalf("Failed to create credential: %v", err)
return nil, fmt.Errorf("failed to create service URL")
}
serviceURL := fmt.Sprintf("https://%s.blob.core.windows.net/", conf.AccountName)
client, err := azblob.NewClientWithSharedKeyCredential(serviceURL, credential, nil)
if err != nil {
log.Fatalf("Failed to create client: %v", err)
return nil, fmt.Errorf("failed to create client")
}
return client, nil
}