@@ -319,7 +319,7 @@ func mappedItemDiffsFromPlan(ctx context.Context, fileName string, lf log.Fields
319319 return nil , fmt .Errorf ("failed to parse '%v': %w" , fileName , err )
320320 }
321321
322- plannedChangeGroups := plannedChangeGroups {
322+ plannedChangeGroupsVar := plannedChangeGroups {
323323 supported : map [string ][]* sdp.MappedItemDiff {},
324324 unsupported : map [string ][]* sdp.MappedItemDiff {},
325325 }
@@ -343,7 +343,7 @@ func mappedItemDiffsFromPlan(ctx context.Context, fileName string, lf log.Fields
343343
344344 if len (mappings ) == 0 {
345345 log .WithContext (ctx ).WithFields (lf ).WithField ("terraform-address" , resourceChange .Address ).Debug ("Skipping unmapped resource" )
346- plannedChangeGroups .Add (resourceChange .Type , & sdp.MappedItemDiff {
346+ plannedChangeGroupsVar .Add (resourceChange .Type , & sdp.MappedItemDiff {
347347 Item : itemDiff ,
348348 MappingQuery : nil , // unmapped item has no mapping query
349349 })
@@ -461,7 +461,7 @@ func mappedItemDiffsFromPlan(ctx context.Context, fileName string, lf log.Fields
461461 }
462462 }
463463
464- plannedChangeGroups .Add (resourceChange .Type , & sdp.MappedItemDiff {
464+ plannedChangeGroupsVar .Add (resourceChange .Type , & sdp.MappedItemDiff {
465465 Item : itemDiff ,
466466 MappingQuery : newQuery ,
467467 })
@@ -476,13 +476,13 @@ func mappedItemDiffsFromPlan(ctx context.Context, fileName string, lf log.Fields
476476 }
477477
478478 supported := ""
479- numSupported := plannedChangeGroups .NumSupportedChanges ()
479+ numSupported := plannedChangeGroupsVar .NumSupportedChanges ()
480480 if numSupported > 0 {
481481 supported = Green .Color (fmt .Sprintf ("%v supported" , numSupported ))
482482 }
483483
484484 unsupported := ""
485- numUnsupported := plannedChangeGroups .NumUnsupportedChanges ()
485+ numUnsupported := plannedChangeGroupsVar .NumUnsupportedChanges ()
486486 if numUnsupported > 0 {
487487 unsupported = Yellow .Color (fmt .Sprintf ("%v unsupported" , numUnsupported ))
488488 }
@@ -499,14 +499,14 @@ func mappedItemDiffsFromPlan(ctx context.Context, fileName string, lf log.Fields
499499 }
500500
501501 // Log the types
502- for typ , plannedChanges := range plannedChangeGroups .supported {
502+ for typ , plannedChanges := range plannedChangeGroupsVar .supported {
503503 log .WithContext (ctx ).Infof (Green .Color (" ✓ %v (%v)" ), typ , len (plannedChanges ))
504504 }
505- for typ , plannedChanges := range plannedChangeGroups .unsupported {
505+ for typ , plannedChanges := range plannedChangeGroupsVar .unsupported {
506506 log .WithContext (ctx ).Infof (Yellow .Color (" ✗ %v (%v)" ), typ , len (plannedChanges ))
507507 }
508508
509- return plannedChangeGroups .MappedItemDiffs (), nil
509+ return plannedChangeGroupsVar .MappedItemDiffs (), nil
510510}
511511
512512func changeTitle (arg string ) string {
0 commit comments