use local variable for rt when iterating collectors
Signed-off-by: Henry Wang <henwang@amazon.com>
This commit is contained in:
parent
60443133da
commit
b9bd10c14e
@ -141,6 +141,7 @@ func startGCContext(ctx context.Context, collectors map[gc.ResourceType]Collecto
|
||||
if len(collectors) > 0 {
|
||||
contexts = map[gc.ResourceType]CollectionContext{}
|
||||
for rt, collector := range collectors {
|
||||
rt := rt
|
||||
c, err := collector.StartCollection(ctx)
|
||||
if err != nil {
|
||||
// Only skipping this resource this round
|
||||
|
Loading…
Reference in New Issue
Block a user