Skip to content

Commit

Permalink
Also returning expanded principals for improved readability
Browse files Browse the repository at this point in the history
  • Loading branch information
mvbrock committed Jan 7, 2025
1 parent 437e832 commit a20ac6f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/srv/discovery/fetchers/azure-sync/memberships.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import (

const parallelism = 10

func expandMemberships(ctx context.Context, cli *msgraph.Client, principals []*accessgraphv1alpha.AzurePrincipal) error {
func expandMemberships(
ctx context.Context,
cli *msgraph.Client, principals []*accessgraphv1alpha.AzurePrincipal,
) ([]*accessgraphv1alpha.AzurePrincipal, error) {
var eg errgroup.Group
eg.SetLimit(parallelism)
for _, principal := range principals {
Expand All @@ -25,5 +28,5 @@ func expandMemberships(ctx context.Context, cli *msgraph.Client, principals []*a
return nil
})
}
return eg.Wait()
return principals, eg.Wait()
}

0 comments on commit a20ac6f

Please sign in to comment.