code tweak after review

pull/2282/head
Clint Shryock 11 years ago
parent 93b5ae5b3c
commit dff6cf1a83

@ -43,16 +43,17 @@ func (s *stepCleanupVolumes) Cleanup(state multistep.StateBag) {
ui.Say("Cleaning up any extra volumes...") ui.Say("Cleaning up any extra volumes...")
save := make(map[string]bool) // We don't actually care about the value here, but we need Set behavior
save := make(map[string]struct{})
for _, b := range s.BlockDevices.AMIMappings { for _, b := range s.BlockDevices.AMIMappings {
if !b.DeleteOnTermination { if !b.DeleteOnTermination {
save[b.DeviceName] = true save[b.DeviceName] = struct{}{}
} }
} }
for _, b := range s.BlockDevices.LaunchMappings { for _, b := range s.BlockDevices.LaunchMappings {
if !b.DeleteOnTermination { if !b.DeleteOnTermination {
save[b.DeviceName] = true save[b.DeviceName] = struct{}{}
} }
} }

Loading…
Cancel
Save