Skip to content

Commit 7c910a6

Browse files
committed
feedback
1 parent 4ea42ff commit 7c910a6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/providers/az-client.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ func (az *AzClient) ListResourceGroups(ctx context.Context, subscriptionID strin
7171
}
7272

7373
func (az *AzClient) ListTenants(ctx context.Context) ([]armsubscription.TenantIDDescription, error) {
74-
log.Debug("listing Azure subscriptions")
74+
log.Debug("Starting to list Azure Tenants")
7575

76-
var tenants []armsubscription.TenantIDDescription
76+
// Initialize the tenant slice to store the results.
77+
tenants := make([]armsubscription.TenantIDDescription, 0)
7778

7879
if az.TenantClient == nil {
7980
c, err := armsubscription.NewTenantsClient(az.Credential, nil)
@@ -98,7 +99,7 @@ func (az *AzClient) ListTenants(ctx context.Context) ([]armsubscription.TenantID
9899
}
99100
}
100101

101-
log.Debug("finished listing Azure tenants")
102+
log.Debugf("Successfully listed %d Azure tenants", len(tenants))
102103
return tenants, nil
103104
}
104105

0 commit comments

Comments
 (0)