Skip to content

Commit

Permalink
update code
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancandevloper committed Aug 23, 2023
1 parent fe8e83b commit 0478ce8
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,11 @@ func (d *Deployment) addExtendInfo(deploymentList appsv1.DeploymentList) []Exten
wg := &sync.WaitGroup{}
for i, deployment := range deploymentList.Items {
wg.Add(1)
deployment := deployment
i := i
go func() {
result := d.getDeployExtendInfo(deployment)
go func(i int, deploy appsv1.Deployment) {
result := d.getDeployExtendInfo(deploy)
resultList[i] = result
wg.Done()
}()
}(i, deployment)
}
wg.Wait()
return resultList
Expand Down

0 comments on commit 0478ce8

Please sign in to comment.