chore(controller): Fix modernize linter (#26313)

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Co-authored-by: Blake Pettersson <blake.pettersson@gmail.com>
This commit is contained in:
Matthieu MOREL
2026-02-07 18:35:48 +01:00
committed by GitHub
parent 2bea8c0deb
commit 0c9039ecd9
3 changed files with 2 additions and 4 deletions

View File

@@ -384,7 +384,6 @@ func (h *Hydrator) hydrate(logCtx *log.Entry, apps []*appv1.Application, project
var mu sync.Mutex
for _, app := range apps[1:] {
app := app
eg.Go(func() error {
_, pathDetails, err = h.getManifests(ctx, app, targetRevision, projects[app.Spec.Project])
mu.Lock()

View File

@@ -115,7 +115,6 @@ argocd_cluster_labels{label_env="production",label_team="team3",name="cluster3",
}
for _, c := range cases {
c := c
t.Run(c.description, func(t *testing.T) {
if !c.skip {
cfg := TestMetricServerConfig{

View File

@@ -209,7 +209,7 @@ func createConsistentHashingWithBoundLoads(replicas int, getCluster clusterAcces
// Adding a shard with id "-1" as a reserved value for clusters that does not have an assigned shard
// this happens for clusters that are removed for the clusters list
// consistentHashing.Add("-1")
for i := 0; i < replicas; i++ {
for i := range replicas {
shard := strconv.Itoa(i)
consistentHashing.Add(shard)
appsIndexedByShard[shard] = 0
@@ -445,7 +445,7 @@ func generateDefaultShardMappingCM(namespace, hostname string, replicas, shard i
func getDefaultShardMappingData(replicas int) []shardApplicationControllerMapping {
shardMappingData := make([]shardApplicationControllerMapping, 0)
for i := 0; i < replicas; i++ {
for i := range replicas {
mapping := shardApplicationControllerMapping{
ShardNumber: i,
}