From 74078104c28487d14f65a80f6e70744b7b27ed5d Mon Sep 17 00:00:00 2001 From: AnguloHerrera Date: Tue, 9 Oct 2018 14:14:54 +0200 Subject: [PATCH] Fix pointer loop var. (#19) --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index ddc4d51..0633258 100644 --- a/main.go +++ b/main.go @@ -402,7 +402,7 @@ func AddContainerInstancesToTasks(svc *ecs.ECS, svcec2 *ec2.EC2, taskList []*Aug } instance, ok := instanceIDToEC2Instance[*containerInstance.Ec2InstanceId] if !ok { - log.Printf("Cannot find EC2 instance", *containerInstance.Ec2InstanceId) + log.Printf("Cannot find EC2 instance %s", *containerInstance.Ec2InstanceId) continue } task.EC2Instance = instance @@ -498,8 +498,8 @@ func GetAugmentedTasks(svc *ecs.ECS, svcec2 *ec2.EC2, clusterArns []*string) ([] } tasks := []*AugmentedTask{} - for _, t := range simpleTasks { - tasks = append(tasks, &AugmentedTask{&t, nil, nil}) + for i := 0; i < len(simpleTasks); i++ { + tasks = append(tasks, &AugmentedTask{&simpleTasks[i], nil, nil}) } tasks, err = AddTaskDefinitionsOfTasks(svc, tasks) if err != nil {