Skip to content

Commit

Permalink
fix: change the type from array to slice to prevent a panic
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Dec 22, 2021
1 parent 12e7ebf commit 386807b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/service/ec2/traffic_mirror_filter_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ func buildTrafficMirrorFilterRulePortRangeSchema(portRange *ec2.TrafficMirrorPor
return nil
}

var out [1]interface{}
out := make([]interface{}, 1)
elem := make(map[string]interface{})
elem["from_port"] = portRange.FromPort
elem["to_port"] = portRange.ToPort
Expand Down

0 comments on commit 386807b

Please sign in to comment.