Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
reference source object by index when ranging while planning
Browse files Browse the repository at this point in the history
  • Loading branch information
imsky committed Apr 5, 2018
1 parent 016fd44 commit 3367931
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
func pairObjectsByCriteria(srcObjects []runtime.Object, dstObjects []runtime.Object, criteria PairCriteria) []ObjectPair {
pairs := make([]ObjectPair, 0, len(srcObjects))

for _, src := range srcObjects {
srcMetadata, srcLabels := getObjectMetadata(src)
pair := ObjectPair{&src, nil}
for i := range srcObjects {
srcMetadata, srcLabels := getObjectMetadata(srcObjects[i])
pair := ObjectPair{&srcObjects[i], nil}

for _, dst := range dstObjects {
dstMetadata, dstLabels := getObjectMetadata(dst)
Expand Down

0 comments on commit 3367931

Please sign in to comment.