Skip to content

Commit

Permalink
chore: slice loop replace
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill committed Sep 7, 2023
1 parent a963623 commit acb5440
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,7 @@ func (watch *ExportServiceWatch) createEpServiceInfo(service *commtypes.BcsServi

// esInfo.exportService.BCSGroup = append(esInfo.exportService.BCSGroup, service.ObjectMeta.Labels["BCSGROUP"])
splitGroups := strings.Split(service.ObjectMeta.Labels["BCSGROUP"], ",")
for _, oneGroup := range splitGroups {
esInfo.exportService.BCSGroup = append(esInfo.exportService.BCSGroup, oneGroup)
}
esInfo.exportService.BCSGroup = append(esInfo.exportService.BCSGroup, splitGroups...)

esInfo.exportService.Balance = service.ObjectMeta.Labels["BCSBALANCE"]
esInfo.exportService.ServiceWeight = make(map[string]int)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,7 @@ func (watch *ExportServiceWatch) createEpServiceInfo(service *commtypes.BcsServi

// esInfo.exportService.BCSGroup = append(esInfo.exportService.BCSGroup, service.ObjectMeta.Labels["BCSGROUP"])
splitGroups := strings.Split(service.ObjectMeta.Labels["BCSGROUP"], ",")
for _, oneGroup := range splitGroups {
esInfo.exportService.BCSGroup = append(esInfo.exportService.BCSGroup, oneGroup)
}
esInfo.exportService.BCSGroup = append(esInfo.exportService.BCSGroup, splitGroups...)

esInfo.exportService.Balance = service.ObjectMeta.Labels["BCSBALANCE"]
esInfo.exportService.ServiceWeight = make(map[string]int)
Expand Down

0 comments on commit acb5440

Please sign in to comment.