Avoid passing zero value into variadic

This commit is contained in:
freddygv 2021-08-19 16:33:42 -06:00
parent f52bd80f6d
commit 01936ddb70
1 changed files with 2 additions and 2 deletions

View File

@ -243,7 +243,7 @@ func xdsNewPublicTransportSocket(
t *testing.T,
snap *proxycfg.ConfigSnapshot,
) *envoy_core_v3.TransportSocket {
return xdsNewTransportSocket(t, snap, true, true, "", connect.SpiffeIDService{})
return xdsNewTransportSocket(t, snap, true, true, "")
}
func xdsNewUpstreamTransportSocket(
@ -278,7 +278,7 @@ func xdsNewTransportSocket(
},
},
}
if uri[0].Service != "" {
if len(uri) > 0 {
require.NoError(t, injectSANMatcher(commonTLSContext, uri...))
}