mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 01:28:45 +01:00
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:
@@ -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()
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user