Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
Fix shadowed nested iteration
Browse files Browse the repository at this point in the history
Reported by @chasewalden, thanks!
  • Loading branch information
jgustie committed Apr 6, 2020
1 parent de3535f commit b967807
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/redskyctl/cmd/get/trial_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ func getKubernetesTrialList(o *GetOptions, meta *trialTableMeta) (*redskyapi.Tri
} else {
for i := range tl.Items {
t := redskyapi.TrialItem{TrialValues: *server.FromClusterTrial(&tl.Items[i])}
for i := range tl.Items[i].Spec.Assignments {
for j := range tl.Items[i].Spec.Assignments {
t.TrialAssignments.Assignments = append(t.TrialAssignments.Assignments, redskyapi.Assignment{
ParameterName: tl.Items[i].Spec.Assignments[i].Name,
Value: json.Number(strconv.FormatInt(tl.Items[i].Spec.Assignments[i].Value, 10)),
ParameterName: tl.Items[i].Spec.Assignments[j].Name,
Value: json.Number(strconv.FormatInt(tl.Items[i].Spec.Assignments[j].Value, 10)),
})
}

Expand Down

0 comments on commit b967807

Please sign in to comment.