From 522da6a7a43998e6bd3fcbfe20ca7f835d471c23 Mon Sep 17 00:00:00 2001 From: Mike Beaumont Date: Sun, 21 Apr 2024 15:58:55 +0200 Subject: [PATCH] refactor: change function arg name from review --- internal/gatewayapi/helpers.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/gatewayapi/helpers.go b/internal/gatewayapi/helpers.go index beb98fa98cd6..1c35e82d4337 100644 --- a/internal/gatewayapi/helpers.go +++ b/internal/gatewayapi/helpers.go @@ -373,7 +373,7 @@ func irRouteDestinationName(route RouteContext, ruleIdx int) string { return fmt.Sprintf("%srule/%d", irRoutePrefix(route), ruleIdx) } -func irTLSConfigs(tlsSecrets []*v1.Secret, listenerHostname *gwapiv1.Hostname) *ir.TLSConfig { +func irTLSConfigs(tlsSecrets []*v1.Secret, sni *gwapiv1.Hostname) *ir.TLSConfig { if len(tlsSecrets) == 0 { return nil } @@ -388,8 +388,8 @@ func irTLSConfigs(tlsSecrets []*v1.Secret, listenerHostname *gwapiv1.Hostname) * PrivateKey: tlsSecret.Data[v1.TLSPrivateKeyKey], } } - if listenerHostname != nil { - tlsListenerConfigs.Inspector.SNIs = []string{string(*listenerHostname)} + if sni != nil { + tlsListenerConfigs.Inspector.SNIs = []string{string(*sni)} } return tlsListenerConfigs }