refactor: simplify middleware code
following code review feedback. pkg/middlewares/aws_route_table_expander.gomain
parent
257c1260dd
commit
5f60cf44bc
|
@ -224,16 +224,10 @@ func (m *AwsRouteTableExpander) handleDefaultTable(table *aws.AwsDefaultRouteTab
|
|||
|
||||
func (m *AwsRouteTableExpander) routeExists(routeId string, resourcesFromState []resource.Resource) bool {
|
||||
for _, res := range resourcesFromState {
|
||||
if res.TerraformType() != aws.AwsRouteResourceType {
|
||||
continue
|
||||
}
|
||||
|
||||
if res.TerraformId() != routeId {
|
||||
continue
|
||||
}
|
||||
|
||||
if res.TerraformType() == aws.AwsRouteResourceType && res.TerraformId() == routeId {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue