Skip to content

Commit

Permalink
chore: preallocate a list of addresses (envoyproxy#3712)
Browse files Browse the repository at this point in the history
Signed-off-by: sanposhiho <44139130+sanposhiho@users.noreply.github.com>
  • Loading branch information
sanposhiho authored Jul 1, 2024
1 parent d670ecb commit 4a74e60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/gatewayapi/status/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func UpdateGatewayStatusProgrammedCondition(gw *gwapiv1.Gateway, svc *corev1.Ser
}
}

var gwAddresses []gwapiv1.GatewayStatusAddress
gwAddresses := make([]gwapiv1.GatewayStatusAddress, 0, len(addresses)+len(hostnames))
for i := range addresses {
addr := gwapiv1.GatewayStatusAddress{
Type: ptr.To(gwapiv1.IPAddressType),
Expand Down

0 comments on commit 4a74e60

Please sign in to comment.